A More Secure Internet Connection for Your Home https://fen.gg
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
zauberstuhl 0bc30a877b Initial wifi integration (#7) 7 months ago
.agola Fix typo in agola config 8 months ago
.gitea/images Initial commit 11 months ago
build Initial commit 11 months ago
config Initial wifi integration (#7) 7 months ago
db/migrations Initial wifi integration (#7) 7 months ago
handler Initial wifi integration (#7) 7 months ago
helper Initial wifi integration (#7) 7 months ago
model Initial wifi integration (#7) 7 months ago
netfilter Remove obsolete benchmark tests 8 months ago
src Initial wifi integration (#7) 7 months ago
static Initial commit 11 months ago
types Initial wifi integration (#7) 7 months ago
utils Restructure the application folder modules 10 months ago
worker Initial wifi integration (#7) 7 months ago
.babelrc Initial commit 11 months ago
.editorconfig Initial commit 11 months ago
.eslintignore Initial commit 11 months ago
.eslintrc.js Initial commit 11 months ago
.gitignore Initial commit 11 months ago
.postcssrc.js Initial commit 11 months ago
LICENSE Initial commit 11 months ago
README.md Merge database migration files 10 months ago
go.mod Initial wifi integration (#7) 7 months ago
go.sum Initial wifi integration (#7) 7 months ago
index.html Initial commit 11 months ago
init.go Initial wifi integration (#7) 7 months ago
log.go Initial wifi integration (#7) 7 months ago
package.json Restructure the application folder modules 10 months ago
server.go Initial wifi integration (#7) 7 months ago
workers.go Initial wifi integration (#7) 7 months ago
yarn.lock Restructure the application folder modules 10 months ago

README.md

Fengg

A More Secure Internet Connection for Your Home A Malicious Traffic Detection System For Small Hardware

https://tea.fen.gg/fengg/server/raw/branch/master/.gitea/images/webinterface.png

Checkout fen.gg/crowdfunding and support us with a small donation.

Development

Compile assets and go binary

# build go binary
VERSION=$(git rev-parse --short HEAD) && \
  go build -o fengg -ldflags "-X tea.fen.gg/fengg/server/config.VERSION=$VERSION"

# set linux capabilities
sudo setcap 'cap_net_admin=+ep' fengg

# compile assets
yarn install
# use either dev or build
yarn [dev|build]

Run server application

./fengg

Cross-Compilation

VERSION=$(git rev-parse --short HEAD) \
CARCH="armv7h" \
CHOST="armv7l-unknown-linux-gnueabihf" \
GOARM="7" \
GOARCH="arm" \
go build \
  -o fengg \
  -ldflags "-s -w" \
  -gcflags=all=-trimpath=$(pwd) \
  -asmflags=all=-trimpath=$(pwd) \
  -ldflags "-X tea.fen.gg/fengg/server/config.VERSION=$VERSION"

Merge database migration files

Drop the database and create a new one. Afterwards remember the highest schema version and delete all files in db/migrations.

Then run the following command (replace XXX with the mentioned version):

pg_dump \
  -T public.schema_migrations \
  -O -s -U postgres -d fengg \
    | sed -e '/^--/d' \
    | sed -e '/^$/d' \
    | grep -v '^SELECT pg_catalog\.set_config.*search_path' \
  > db/migrations/000XXX_merged_initial_database.up.sql

Commit and test your changes!