Open vesnindev opened 1 year ago
Can you please check the log files for more info. The warnings are not necessarily bad, they are just informing.
Now I add ipv6^
`cd /root/Wireguard-Manager-and-API; go get; go build -o wgManagerAPI main.go; sudo ./wgManagerAPI; WG MANAGER AND API STARTING UP Env file loading - 1/6 Logger starting up - 2/6 Starting database - 3/6
2023/08/03 22:04:44 /root/Wireguard-Manager-and-API/src/db/db.go:62 record not found
[0.574ms] [rows:0] SELECT * FROM ips
WHERE ipv6_address = "2a02:748:4000::250" ORDER BY ips
.ipv4_address
LIMIT 1
Starting of network - 4/6
Created wireguard instance on port 51821
Warning - Failed to add IP address file exists
Starting autochecker - 5/6
Starting API - 6/6
HTTPS about to listen on 8443.root@v340811515:~/Wireguard-Manager-and-API# netstat -na | grep :8443
root@v340811515:~/Wireguard-Manager-and-API#
`
This is log file:
2023/08/03 22:04:44 Info - Database connection starting 2023/08/03 22:04:44 Info - Successfully migrated db 2023/08/03 22:04:44 Info - Generating IPs 2023/08/03 22:04:44 Info - IP Address not found, generating 2023/08/03 22:04:46 Info - Generated IPs successfully 2023/08/03 22:04:46 Info - Setting up WG interface 2023/08/03 22:04:46 Info - Starting up wg interface 2023/08/03 22:04:46 Wireguard instance in database was found - overriding some values. 2023/08/03 22:04:46 Info - Creating wg device client 2023/08/03 22:04:46 Info - Interface exists, adding peers 2023/08/03 22:04:46 Info - Closing wg device client 2023/08/03 22:04:46 Info - Checking if IPs exist 2023/08/03 22:04:46 Info - Added IP address to interface 2023/08/03 22:04:46 Warning - Failed to add IP address file exists 2023/08/03 22:04:46 Info - Added IP address to interface 2023/08/03 22:04:46 Info - Added IP address to interface 2023/08/03 22:04:46 Info - Added IP address to interface 2023/08/03 22:04:46 Info - Added IP address to interface 2023/08/03 22:04:46 Info - AutoStart running 2023/08/03 22:04:46 Info - Running check bandwidth 2023/08/03 22:04:46 Info - Creating wg device client 2023/08/03 22:04:46 Info - Closing wg device client 2023/08/03 22:04:46 HTTPS about to listen on 8443. 2023/08/03 22:04:46 Error - Startup of API serveropen : no such file or directory
The last line says it is unable to find file or directory. This may be your https certificate. Can you double check location.
I have some questions:
Is it necessary to prescribe ipv6? will it work without it(INSTANCE.IP.GLOBAL.ADDRESS.IPV6) - is this external address correct?
INSTANCE.IP.GLOBAL.ADDRESS.IPV4 - This is the external address of the server, right?
Local addresses can not be changed?
How can I run the API without an SSL certificate? I don't plan to use domains for API
Maximum number of peers on 1 server? for normal operation? 250? I saw 350 in the config
Thanks
The last line says it is unable to find file or directory. This may be your https certificate. Can you double check location.
"CERT": { "FULLCHAIN": "", "PK": "" },
I turned off the SSL and started the API. Other questions are still relevant.
Can you suggest how I can generate QR from the API results and create a config file for import in APP
And how i can get PrivateKey? from API or wg config? I understand correctly that your api creates its own interface and private key? and not use default wg0.conf
And why after add new key, I got "PresharedKey" => "REDACTED" ?
sudo: ./services/start.sh: command not found
And how i can get PrivateKey? from API or wg config? I understand correctly that your api creates its own interface and private key? and not use default wg0.conf
Sorry for the late reply. This is correct, it does not use the default wg0.conf. The private key to my knowledge (I haven't worked on this project in ages) is stored in the database in the WireguardInterface table.
And why after add new key, I got "PresharedKey" => "REDACTED" ?
This is because a preshared key is an extra layer of security. You are already specifying the preshared key when creating a new key, why do you need to see it?
Hi. I clone repo, setup config.json and when i start commands:
Do not forget to add your config.json file to /opt/wgManagerAPI/config.json
git clone this repository cd wireguard-manager-and-api to open the repo go get to get packages go build -o wgManagerAPI main.go to build an output a executable file sudo ./wgManagerAPI to run the application.
I got error:
WG MANAGER AND API STARTING UP Env file loading - 1/6 Logger starting up - 2/6 Starting database - 3/6 Starting of network - 4/6 Created wireguard instance on port 51821 Warning - Failed to add IP address file exists Warning - Failed to add IP address file exists Warning - Failed to add IP address file exists Warning - Failed to add IP address file exists Starting autochecker - 5/6 Starting API - 6/6 HTTPS about to listen on 8443.root@v340811515netstat -na | grep :8443 :~/Wireguard-Manager-and-API#
in config.json isset real ipv4 adress, but not set ipv6
in log Error - Startup of API serveropen : no such file or directory