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

AzireVPN: "Error: error decoding response body" #269

Open
rexVictor opened this issue May 27, 2024 · 4 comments
Open

AzireVPN: "Error: error decoding response body" #269

rexVictor opened this issue May 27, 2024 · 4 comments

Comments

@rexVictor
Copy link

Hi,
I tried setting up vopono but get the following error:

$ vopono sync -c Wireguard AzireVPN
2024-05-27T20:06:14.263Z INFO vopono::sync > Starting Wireguard configuration...
AzireVPN username: [censored]
AzireVPN password: [hidden]
Error: error decoding response body

Caused by:
missing field data at line 4 column 1

Do I need to run some other command first?

@jamesmcm
Copy link
Owner

Can you run it with -v to see the debug output?

vopono -v sync -c Wireguard AzireVPN

I assume the response or URL here has changed - https://github.com/jamesmcm/vopono/blob/master/vopono_core/src/config/providers/azirevpn/wireguard.rs#L35

@rexVictor
Copy link
Author

Sure thing.

$ vopono -v sync -c Wireguard AzireVPN
 2024-05-28T02:03:58.639Z INFO  vopono::sync > Starting Wireguard configuration...
 2024-05-28T02:03:58.639Z DEBUG vopono_core::util > Using config dir from $HOME config: /home/[censored]/.config
AzireVPN username: [censored]
AzireVPN password: [hidden]
 2024-05-28T02:04:14.727Z DEBUG vopono_core::config::providers::azirevpn::wireguard > Chosen keypair: WgKey { public: "[censored]", private: "[censored]" }
 2024-05-28T02:04:14.729Z DEBUG reqwest::connect                               > starting new connection: https://api.azirevpn.com/
 2024-05-28T02:04:14.827Z DEBUG rustls::client::hs                                  > No cached session for DnsName("api.azirevpn.com")
 2024-05-28T02:04:14.828Z DEBUG rustls::client::hs                                  > Not resuming any session
 2024-05-28T02:04:14.863Z DEBUG rustls::client::hs                                  > Using ciphersuite TLS13_AES_256_GCM_SHA384
 2024-05-28T02:04:14.864Z DEBUG rustls::client::tls13                               > Not resuming
 2024-05-28T02:04:14.865Z DEBUG rustls::client::tls13                               > TLS1.3 encrypted extensions: [ServerNameAck, Protocols([ProtocolName(687474702f312e31)])]
 2024-05-28T02:04:14.865Z DEBUG rustls::client::hs                                  > ALPN protocol is Some(b"http/1.1")
 2024-05-28T02:04:15.118Z DEBUG vopono_core::config::providers::azirevpn::wireguard > Response: Response { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.azirevpn.com")), port: None, path: "/v1/wireguard/connect/ca1", query: None, fragment: None }, status: 200, headers: {"server": "nginx", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "keep-alive", "cache-control": "no-cache", "date": "Tue, 28 May 2024 02:04:15 GMT", "x-ratelimit-limit": "60", "x-ratelimit-remaining": "59", "expires": "Thu, 01 Jan 1970 00:00:01 GMT", "strict-transport-security": "max-age=63072000; includeSubDomains; preload"} }
Error: error decoding response body

Caused by:
    missing field `data` at line 1 column 49

For some weird reason I never saw --verbose in --help despite looking :).
I censored the keys. I hope you don't need them. If they are private, it might be a good idea to include a verbose option that doesn't log private data.
Is DEBUG reqwest::connect a typo in a string?
If you need anything else, I'm glad to provide it.
P.S. I didn't quite get from the docs if port forwarding is supported with AzireVPN. It felt a bit contradictory. Maybe you could tell me definitively.

@jamesmcm
Copy link
Owner

It looks like they've changed the API.

I think port forwarding used to just work with -o xxx when you could get the port assigned on the web, but that might have changed since the original code was written.

@LUVROK
Copy link

LUVROK commented Jun 8, 2024

the same is now for mullvad, idk, but this utility still does not work. But it's a great idea, I hope you fix this error. In general, in order not to depend on the api, the best idea is to use the configs that I have already downloaded, I don't understand why I can't do this, it would be a more universal way to connect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants