Giter Site home page Giter Site logo

incognito-coder / wiregen Goto Github PK

View Code? Open in Web Editor NEW
81.0 1.0 12.0 150 KB

a script for generate wireguard configs from surfshark vpn service,based on mobile API

Home Page: https://mr-alireza.ir

Python 96.80% Shell 3.20%
surfshark vpn wireguard wireguard-configuration python linux python3 proxy android ios

wiregen's Issues

trackback issue

i tryed to extraxt my new wireguard configs but i got this error

image
image

Error 403

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.

Fails after generating two configs

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

cant extract configs

when i enter my email and password this happen and dosen't save any private and public key
na config va na key ha ro hich kodoom zakhore nemikon
Screenshot 2022-07-19 231646
e

Error 403

getting error 403 when trying to generate configs

Error 401

python3 wiregen.py --user * --pass *
Error 401

python wiregen.py -u * -p *
File "wiregen.py", line 24
print(f'PrivateK : {prvK}')
^
SyntaxError: invalid syntax

Wiregen confs need to be regenerated after a few days?

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:

  • My wireguard installation
  • Surfshark
  • Wiregen
  • My OS settings
  • Something else entirely

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.

What is uymgg1.com?

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:

  • The surfshark.com SSL certificate was issued by Cloudflare. The uymgg1.com certificate was issued by Let's Encrypt.
  • The domain registration information for the two domains looks quite different.
  • Browsing to https://uymgg1.com involves a noticeable delay before the site loads. But pinging 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?

Error 429

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?

ModuleNotFoundError: No module named 'requests'

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'

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.