Coder Social home page Coder Social logo

Comments (14)

BankaiNoJutsu avatar BankaiNoJutsu commented on August 22, 2024 2

@jack1902 @gavinelder allright, I'll work on a pull for this. In two steps if okay. First one to get the theme sorted out, second for the status page (so far it was accessible to all users, but i will see to add it to a per user basis. This was due to the fact i use it on a personal/family level and never thought of implementing it in a different way).

Edit: i had also added basic dyndns (duckdns) and routing selection on creation of profile, qr code/download as well as web based server setting editing. Let me know in what you're interested to implement.

from subspace.

gavinelder avatar gavinelder commented on August 22, 2024 1

Awesome , my front end skills are sketchy at best so any help tidying up the UI would be greatly appreciated.

I intent to extend the admin interface to move the config out of flags, so if you would like to pair on other ideas it would be Amazing.

A toggle dark theme is one of those features that people love.

from subspace.

jack1902 avatar jack1902 commented on August 22, 2024

@BankaiNoJutsu Must admit, like the Dark colours on your fork plus the wireguard logo! If you open a PR to add the status page of each Client (Assuming this is only seeable by an Admin?) Then we can review and get it merged into this fork which has blown up after it landed on the hacker news website https://news.ycombinator.com/item?id=23243248

from subspace.

gavinelder avatar gavinelder commented on August 22, 2024

@BankaiNoJutsu again really like your theme.

from subspace.

jack1902 avatar jack1902 commented on August 22, 2024

@BankaiNoJutsu appreciate the effort!

If possible can we do it in seperate Pull requests:

  • theme addition ( possible to make it use default or dark?)
  • status page would be visible to admins only, this makes it easier to check rather than a per user basis ( if admin show, else don't)
  • web based server setting editing is something we really want to add as the cli options are just messy and will never scale.

Happy to assist where possible (I'm an engineer by trade, normally Python but current learning golang very heavily and hoping to open source a very much needed feature for wireguard)

from subspace.

jack1902 avatar jack1902 commented on August 22, 2024

@BankaiNoJutsu Do you want any assistance in pulling this in?

from subspace.

BankaiNoJutsu avatar BankaiNoJutsu commented on August 22, 2024

@jack1902 yes! That would be great! I am out of time these days, so help is appreciated :)

from subspace.

jack1902 avatar jack1902 commented on August 22, 2024

Awesome, possible to guide through the changes?

Is the status page a new page and what functions in golang?

How did you do the theme (it's so much nicer)

from subspace.

BankaiNoJutsu avatar BankaiNoJutsu commented on August 22, 2024

It is a new page yes, you can see it under "templates" folder. web, main and handlers.go need also some changes to add the page. You can check my commits, even if messy, it should hopefully be understandable.

It's a new handler, with some functions added (byte conversion etc), hence why there are new dependencies in my fork, for the status page, and for the qr display.

For the theme, i think most is in this commit:
BankaiNoJutsu@6c42049

I will see if next week i find some time to start on this, in the meantime you can ask me if you have questions.

Cheers!

from subspace.

jack1902 avatar jack1902 commented on August 22, 2024

Will do, once #75 is merged then i will create a branch to start this work (master is currently broken). The status page will be useful for sure

from subspace.

BankaiNoJutsu avatar BankaiNoJutsu commented on August 22, 2024

Hey! Just wanted to update, i am finalizing, a few things left to do, but should be ready within a few hours/days, depends :).

There a quite a lot of changes, so i will build a docker image so you guys can try it before we even consider merging the changes, is that okay?

EDIT: in the end the change includes the theme and the status page, as well as structural changes. Which is why i think it is safer to let you try it out first

from subspace.

BankaiNoJutsu avatar BankaiNoJutsu commented on August 22, 2024

@jack1902 @gavinelder hey, would you guys be able to test my fork? I have issues with docker somehow... I can run the binary locally just fine, but docker won't find the "wg" bin when running the entrypoint.sh...

It should normally work, but i need people to test, and possibly report issues.

Please note that you can run it locally this way:
sudo go generate -v -x && sudo go build
sudo ./subspace --debug --datadir=/etc --http-insecure=true --letsencrypt=false --http-host localhost

I have all my data in /etc/wireguard with:

  • config/config.conf
  • clients/< profilename >/*.conf (and .png)
  • peers/< profilename >/*.conf (and .png)
  • server/server.conf (and keys)

Some paths are still hardcoded until we/I can fix that... So for now, it's only working using datadir=/etc... sorry...

Oh and you can still try my dev branch, which is an old master copy. The idea there was to have an admin server settings section (in the top right corner) where you could:

  • change the endpoint and listening port
  • restart the server and wg, and also update the existing client configs (needs a re-import on client side, but that cannot be avoided i guess)

from subspace.

jack1902 avatar jack1902 commented on August 22, 2024

easy one to change, literally change back the /etc/wireguard to /data/wireguard which is where the external config paths are mounted INTO the container.

Changes i had to make to your fork to get it to run:

  • Update the entrypoint.sh to match the un-break branch (this included copying over the bin/ directory
  • Copied the Dockerfile from the un-break branch
  • Change /etc/wireguard -> /data/wireguard
  • Add a docker-compose file and amend an arm binary version to the Makefile so i can run on raspberry pi

@gavinelder wondering if we should attempt to add a new config option to have theme original (green) / dark as i like the idea of having the option.

Also here is my compose file if you are interested @BankaiNoJutsu

version: "3.3"
services:
  subspace:
   build:
     context: .
     dockerfile: Dockerfile
   container_name: subspace
   volumes:
    - /mnt/docker/subspace_data:/data
   restart: always
   environment:
    - SUBSPACE_HTTP_HOST=localhost
    - SUBSPACE_LETSENCRYPT=false
    - SUBSPACE_HTTP_INSECURE=true
    - SUBSPACE_HTTP_ADDR=":80"
    - SUBSPACE_NAMESERVER=1.1.1.1
    - SUBSPACE_LISTENPORT=51820
    - SUBSPACE_IPV4_POOL=10.99.97.0/24
    - SUBSPACE_IPV6_POOL=fd00::10:97:0/64
    - SUBSPACE_IPV4_GW=10.99.97.1
    - SUBSPACE_IPV6_GW=fd00::10:97:1
    - SUBSPACE_IPV6_NAT_ENABLED=1
   cap_add:
    - NET_ADMIN
   network_mode: "host"

from subspace.

gavinelder avatar gavinelder commented on August 22, 2024

@BankaiNoJutsu thanks for your patience I will review your PR tomorrow.

from subspace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.