incognito-coder / wiregen Goto Github PK
View Code? Open in Web Editor NEWa script for generate wireguard configs from surfshark vpn service,based on mobile API
Home Page: https://mr-alireza.ir
a script for generate wireguard configs from surfshark vpn service,based on mobile API
Home Page: https://mr-alireza.ir
Changing the password to a string without $ inside helps. Using "" ord '' does not help.
I already tried it while connected to vpn and the result is the same error. Yes, I'm using surfshark, and yes, my creds are correct. I will report back if it works after update & reboot.
Now password field is plain text and after it is typed anyone can see it behind your back. Which isn't standard behavior related to passwords.
Status: OK
Register: True
Valid: 2022-08-11T17:35:24+00:00
Generating zip file
Tirana Created Successfully.
Algiers Created Successfully.
Traceback (most recent call last):
File "/home/Nick/Wiregen/wiregen.py", line 216, in
main(sys.argv[1:])
File "/home/Nick/Wiregen/wiregen.py", line 209, in main
Builder(path)
File "/home/Nick/Wiregen/wiregen.py", line 109, in Builder
ip = socket.gethostbyname(i['connectionName'])
socket.gaierror: [Errno -2] Name or service not known
getting error 403 when trying to generate configs
من کدگذاری @Incognito-Coder `
python3 wiregen.py --user * --pass *
Error 401
python wiregen.py -u * -p *
File "wiregen.py", line 24
print(f'PrivateK : {prvK}')
^
SyntaxError: invalid syntax
I'm rather new to wireguard, so I don't know if this is normal behavior.
After a seemingly random amount of time (~1-2 weeks), all the .conf files generated by wiregen become unusable, as if they "expired"?
Wireguard doesn't seem to throw any errors, but I won't have any internet access. I tried switching servers, but the issue seems to affect all confs. Of course if I disconnect from wireguard, my internet connection comes back.
When it happens, if I regenerate the confs with wiregen, replace them in /etc/wireguard
and try to reconnect, it fixes the problem and everything works fine until the confs "expire" again.
I'm not sure if this is an issue with:
But I've got wireguard configured on two different computers both running Manjaro linux KDE. And the issue keeps happening on both computers.
Switching servers, rebooting, reconnecting and so on doesn't seem to fix anything, the only fix I found is to regenerate the confs.
The script uses two different hostnames to access the Surfshark API: api.surfshark.com
and api.uymgg1.com
What is uymgg1.com?
Replacing all instances of uymgg1
with surfshark
in the script works.
Now, based on anecdotal reports, it does look like uymgg1
may actually be a Surfshark URL, but a few things gave me spoofy vibes:
surfshark.com
SSL certificate was issued by Cloudflare. The uymgg1.com
certificate was issued by Let's Encrypt.uymgg1.com
results in much faster response times than pinging surfshark.com
(both from a Seattle server: 15ms versus 50ms).If the surfshark
domain works, perhaps consider switching to eliminate any confusion. I am not saying you are doing anything nefarious, but the unexpected nature of a strange URL combined with the three factors above made me a bit suspicious. It's why I changed all the URLs to surfshark.com
, and I'm glad it worked because I am not willing to authenticate against uymgg1
unless I see something from Surfshark claiming ownership of that URL.
Aside from that, thanks for throwing this together, so far it's working perfectly well. I'm curious, how did you figure out the correct sequence of steps, endpoints, and request fields/payload structure?
I'm getting an error 429 (too many requests) on v2.9. Tried running with and without VPN with the same result. Anyone with the same issue. Could it be a recently introduced rate limit?
I installed it by pacman. sudo pacman -S python3 wireguard-tools surfshark-wireguard
. I get this error when running wiregen
.
Traceback (most recent call last):
File "/usr/bin/wiregen", line 8, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.