Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to see initial dashboard and wg0 as active however unable to see clients or any additional info. May be similar to issue#3 #21

Closed
robchez opened this issue May 8, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@robchez
Copy link

robchez commented May 8, 2021

Describe The Problem
Have same/similar issue as described in Issue# 3. Able to get the dashboard running however only displays Wg0. When selecting that interface shows blank screen. Did run sh wgd.sh update to make sure had the latest version

Expected Error / Traceback

[08/May/2021 10:44:14] "GET /get_config/wg0 HTTP/1.1" 500 -
[2021-05-08 10:44:31,342] ERROR in app: Exception on /get_config/wg0 [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "dashboard.py", line 406, in get_conf
    "peer_data": get_peers(config_name),
  File "dashboard.py", line 183, in get_peers
    get_conf_peers_data(config_name)
  File "dashboard.py", line 142, in get_conf_peers_data
    total_sent = cur_i[0]['total_sent']
IndexError: list index out of range


To Reproduce
Default page shows Wg0. When selecting Wg0 returns blank page with navigation on left still visible. Error shown above.

OS Information:

 PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
 
- Python Version: Python 3.7.3-1

Sample of your .conf file

username = admin
password = ABCD

[Server]
wg_conf_path = /etc/wireguard/
app_ip = 0.0.0.0
app_port = 10086
auth_req = false
version = v2.0

My WG Directory Structure
Not sure if this might be the problem. I did move a few client configs to root /etc/wireguard and I did see them in the dashboard but no metrics.

/etc/wireguard
├── client
└── keys
    ├── client
    │   ├── private
    │   └── public
    └── server
        ├── private
        └── public
@robchez robchez added the bug Something isn't working label May 8, 2021
@donaldzou
Copy link
Owner

Hi, could you provide a sample of your client configuration file please?

@robchez
Copy link
Author

robchez commented May 10, 2021

Sure here is one of my configs.

[Interface]
Address = 10.0.0.4/32
DNS = 192.168.86.1 
PrivateKey = abc1234

[Peer]
PublicKey = abc1235
Endpoint = myendpoint.enpoint.123:51820
AllowedIPs = 0.0.0.0/0
PersistentkeepAlive = 60

@donaldzou
Copy link
Owner

donaldzou commented May 10, 2021

Hi, I'm thinking that you could point the dashboard in the dashboard setting to where you have the configuration saved, and make sure it have read permission for your current user.

@robchez
Copy link
Author

robchez commented May 10, 2021

Right, I have wg0.config in /etc/wireguard/ and the rest of the configs a few subdirs down. Is the dashboard looking for them to all be in the same directory (wg will read subdirs and does work. I have the subdirs because I have a lot of configs.)? If so that's likely my problem. That was my initial thought as well, might just have to have all configs in the same directory.

@donaldzou
Copy link
Owner

I see, the dashboard will only look for .conf in the top-level directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants