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

Stuck on "Launching OpenVPN..." #102

Closed
pigeonburger opened this issue Sep 7, 2021 · 9 comments
Closed

Stuck on "Launching OpenVPN..." #102

pigeonburger opened this issue Sep 7, 2021 · 9 comments

Comments

@pigeonburger
Copy link

pigeonburger commented Sep 7, 2021

Hi, I'm just trying to test out this program (it looks exactly like what I need so thank you for making it!) but I'm having some trouble while using it with NordVPN. I'm running Ubuntu Server 20.04.3.

I've synced all the OVPN config files and am now trying to run the following command:

vopono exec --provider nordvpn --server australia-au631.ovpn --interface enp5s0 "curl ifconfig.co/country"

But it gets no further than this:

 2021-09-06T23:51:26.871Z INFO  vopono::util > Calling sudo for elevated privileges, current user will be used as default user
 2021-09-06T23:51:27.041Z INFO  vopono::util > Chosen config: /home/pigeonburger/.config/vopono/nordvpn/openvpn/australia-au631.ovpn
 2021-09-06T23:51:27.043Z INFO  vopono::netns > Created new network namespace: vopono_nordvpn_australia-au631.ovpn
STATE         CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN
disconnected  unknown       enabled  enabled  enabled  enabled
 2021-09-06T23:51:27.116Z INFO  vopono::netns > IP address of namespace as seen from host: 10.200.2.2
 2021-09-06T23:51:27.116Z INFO  vopono::netns > IP address of host as seen from namespace: 10.200.2.1
 2021-09-06T23:51:27.120Z INFO  vopono::openvpn > Launching OpenVPN...

It just stays on "Launching OpenVPN..." forever, until I manually kill the program. I can confirm that when using OpenVPN normally, I can connect fine.

Verbose output:

2021-09-07T00:19:29.644Z DEBUG vopono::util > Using config dir from XDG dirs: /home/pigeonburger/.config
 2021-09-07T00:19:29.648Z DEBUG vopono::pulseaudio > Setting PULSE_SERVER to /run/user/1000/pulse/native
 2021-09-07T00:19:29.648Z INFO  vopono::util       > Calling sudo for elevated privileges, current user will be used as default user
 2021-09-07T00:19:29.648Z DEBUG vopono::util       > Args: ["vopono", "-v", "exec", "--provider", "nordvpn", "--server", "australia-au631.ovpn", "--interface", "enp5s0", "curl ifconfig.co/country"]
 2021-09-07T00:19:29.756Z DEBUG vopono::util > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.760Z DEBUG vopono::pulseaudio > Setting PULSE_SERVER to /run/user/1000/pulse/native
 2021-09-07T00:19:29.760Z DEBUG vopono::util       > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.761Z DEBUG vopono::util       > Existing namespaces: []
 2021-09-07T00:19:29.761Z DEBUG vopono::util       > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.761Z DEBUG vopono::util       > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "firewall" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "custom_config" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "postup" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "predown" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "user" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "dns" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > vopono config.toml: configuration property "protocol" not found
 2021-09-07T00:19:29.761Z DEBUG vopono::util       > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.761Z DEBUG vopono::exec       > Interface: enp5s0
 2021-09-07T00:19:29.761Z DEBUG vopono::util       > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.779Z INFO  vopono::util       > Chosen config: /home/pigeonburger/.config/vopono/nordvpn/openvpn/australia-au631.ovpn
 2021-09-07T00:19:29.780Z DEBUG vopono::util       > Existing namespaces: []
 2021-09-07T00:19:29.780Z DEBUG vopono::util       > ip netns add vopono_nordvpn_australia-au631.ovpn
 2021-09-07T00:19:29.781Z INFO  vopono::netns      > Created new network namespace: vopono_nordvpn_australia-au631.ovpn
 2021-09-07T00:19:29.782Z DEBUG vopono::util       > Existing interfaces:
 2021-09-07T00:19:29.783Z DEBUG vopono::util       > Assigned IPs: []
 2021-09-07T00:19:29.783Z DEBUG vopono::netns      > ip netns exec vopono_nordvpn_australia-au631.ovpn ip addr add 127.0.0.1/8 dev lo
 2021-09-07T00:19:29.785Z DEBUG vopono::netns      > ip netns exec vopono_nordvpn_australia-au631.ovpn ip link set lo up
STATE         CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN
disconnected  unknown       enabled  enabled  enabled  enabled
 2021-09-07T00:19:29.797Z DEBUG vopono::veth_pair  > Detected NetworkManager running
 2021-09-07T00:19:29.797Z DEBUG vopono::veth_pair  > NetworkManager detected, adding nordvpn_austr_d to unmanaged devices
 2021-09-07T00:19:29.797Z DEBUG vopono::veth_pair  > Appending to existing NetworkManager config file: /etc/NetworkManager/conf.d/unmanaged.conf
 2021-09-07T00:19:29.797Z DEBUG vopono::util       > nmcli connection reload
 2021-09-07T00:19:29.806Z DEBUG vopono::veth_pair  > firewalld not detected running
 2021-09-07T00:19:29.806Z DEBUG vopono::util       > ip link add nordvpn_austr_d type veth peer name nordvpn_austr_s
 2021-09-07T00:19:29.807Z DEBUG vopono::util       > ip link set nordvpn_austr_d up
 2021-09-07T00:19:29.809Z DEBUG vopono::util       > ip link set nordvpn_austr_s netns vopono_nordvpn_australia-au631.ovpn up
 2021-09-07T00:19:29.842Z DEBUG vopono::util       > ip addr add 10.200.1.1/24 dev nordvpn_austr_d
 2021-09-07T00:19:29.844Z DEBUG vopono::netns      > ip netns exec vopono_nordvpn_australia-au631.ovpn ip addr add 10.200.1.2/24 dev nordvpn_austr_s
 2021-09-07T00:19:29.846Z DEBUG vopono::netns      > ip netns exec vopono_nordvpn_australia-au631.ovpn ip route add default via 10.200.1.1 dev nordvpn_austr_s
 2021-09-07T00:19:29.848Z INFO  vopono::netns      > IP address of namespace as seen from host: 10.200.1.2
 2021-09-07T00:19:29.848Z INFO  vopono::netns      > IP address of host as seen from namespace: 10.200.1.1
 2021-09-07T00:19:29.848Z DEBUG vopono::util       > iptables -t nat -A POSTROUTING -s 10.200.1.0/24 -o enp5s0 -j MASQUERADE
 2021-09-07T00:19:29.849Z DEBUG vopono::util       > iptables -I FORWARD -i nordvpn_austr_d -o enp5s0 -j ACCEPT
 2021-09-07T00:19:29.851Z DEBUG vopono::util       > iptables -I FORWARD -o nordvpn_austr_d -i enp5s0 -j ACCEPT
 2021-09-07T00:19:29.851Z DEBUG vopono::util       > sysctl -q net.ipv4.ip_forward=1
 2021-09-07T00:19:29.852Z DEBUG vopono::util       > Using config dir from $SUDO_USER config: /home/pigeonburger/.config
 2021-09-07T00:19:29.852Z DEBUG vopono::vpn        > Read auth file: /home/pigeonburger/.config/vopono/nordvpn/openvpn/auth.txt
 2021-09-07T00:19:29.852Z DEBUG vopono::dns_config > Setting namespace vopono_nordvpn_australia-au631.ovpn DNS server to 103.86.96.100, 103.86.99.100
 2021-09-07T00:19:29.852Z INFO  vopono::openvpn    > Launching OpenVPN...
 2021-09-07T00:19:29.853Z DEBUG vopono::openvpn    > Found remotes: [Remote { host: IPv4(45.248.77.187), port: 1194, protocol: UDP }]
 2021-09-07T00:19:29.853Z DEBUG vopono::netns      > ip netns exec vopono_nordvpn_australia-au631.ovpn openvpn --config /home/pigeonburger/.config/vopono/nordvpn/openvpn/australia-au631.ovpn --machine-readable-output --log /etc/netns/vopono_nordvpn_australia-au631.ovpn/openvpn.log --auth-user-pass /home/pigeonburger/.config/vopono/nordvpn/openvpn/auth.txt
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.856996 40 WARNING: file '/home/pigeonburger/.config/vopono/nordvpn/openvpn/auth.txt' is group or others accessible\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857013 1 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 19 2021\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857021 1 library versions: OpenSSL 1.1.1f  31 Mar 2020, LZO 2.10\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857112 40 WARNING: --ping should normally be used with --ping-restart or --ping-exit\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857352 14000002 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857360 14000002 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857440 1 TCP/UDP: Preserving recently used remote address: [AF_INET]45.248.77.187:1194\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857456 2b000003 Socket Buffers: R=[212992->212992] S=[212992->212992]\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857459 1 UDP link local: (not bound)\n"
 2021-09-07T00:19:29.857Z DEBUG vopono::openvpn    > "1630973969.857463 1 UDP link remote: [AF_INET]45.248.77.187:1194\n"
 2021-09-07T00:19:29.887Z DEBUG vopono::openvpn    > "1630973969.887180 14000003 TLS: Initial packet from [AF_INET]45.248.77.187:1194, sid=223333a9 a296ffd1\n"
 2021-09-07T00:19:29.887Z DEBUG vopono::openvpn    > "1630973969.887280 40 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this\n"
 2021-09-07T00:19:29.965Z DEBUG vopono::openvpn    > "1630973969.965581 14000002 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA\n"
 2021-09-07T00:19:29.965Z DEBUG vopono::openvpn    > "1630973969.965844 14000002 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA6\n"
 2021-09-07T00:19:29.966Z DEBUG vopono::openvpn    > "1630973969.966091 14000002 VERIFY KU OK\n"
 2021-09-07T00:19:29.966Z DEBUG vopono::openvpn    > "1630973969.966098 14000002 Validating certificate extended key usage\n"
 2021-09-07T00:19:29.966Z DEBUG vopono::openvpn    > "1630973969.966102 14000002 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication\n"
 2021-09-07T00:19:29.966Z DEBUG vopono::openvpn    > "1630973969.966105 14000002 VERIFY EKU OK\n"
 2021-09-07T00:19:29.966Z DEBUG vopono::openvpn    > "1630973969.966108 14000002 VERIFY OK: depth=0, CN=au631.nordvpn.com\n"
 2021-09-07T00:19:30.026Z DEBUG vopono::openvpn    > "1630973970.026331 14000002 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 4096 bit RSA\n"
 2021-09-07T00:19:30.026Z DEBUG vopono::openvpn    > "1630973970.026352 1 [au631.nordvpn.com] Peer Connection Initiated with [AF_INET]45.248.77.187:1194\n"
 2021-09-07T00:19:31.044Z DEBUG vopono::openvpn    > "1630973971.044786 22000003 SENT CONTROL [au631.nordvpn.com]: 'PUSH_REQUEST' (status=1)\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075484 22000003 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 103.86.96.100,dhcp-option DNS 103.86.99.100,sndbuf 524288,rcvbuf 524288,explicit-exit-notify,comp-lzo no,route-gateway 10.8.1.1,topology subnet,ping 60,ping-restart 180,ifconfig 10.8.1.3 255.255.255.0,peer-id 1,cipher AES-256-GCM'\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > Found OpenVPN DNS response: 103.86.96.100
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > Set OpenVPN DNS to: 103.86.96.100
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075581 22000003 OPTIONS IMPORT: timers and/or timeouts modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075586 22000003 OPTIONS IMPORT: explicit notify parm(s) modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075589 22000003 OPTIONS IMPORT: compression parms modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075593 22000003 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075602 2b000003 Socket Buffers: R=[212992->425984] S=[212992->425984]\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075605 22000003 OPTIONS IMPORT: --ifconfig/up options modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075608 22000003 OPTIONS IMPORT: route options modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075611 22000003 OPTIONS IMPORT: route-related options modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075614 22000003 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075616 22000003 OPTIONS IMPORT: peer-id set\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075620 22000003 OPTIONS IMPORT: adjusting link_mtu to 1657\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075622 22000003 OPTIONS IMPORT: data channel crypto options modified\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075627 14000002 Data Channel: using negotiated cipher 'AES-256-GCM'\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075701 14000002 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075707 14000002 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key\n"
 2021-09-07T00:19:31.075Z DEBUG vopono::openvpn    > "1630973971.075804 3 ROUTE_GATEWAY 10.200.1.1/255.255.255.0 IFACE=nordvpn_austr_s HWADDR=52:e1:b8:b2:e9:c2\n"
 2021-09-07T00:19:31.076Z DEBUG vopono::openvpn    > "1630973971.076013 1 TUN/TAP device tun0 opened\n"
 2021-09-07T00:19:31.076Z DEBUG vopono::openvpn    > "1630973971.076037 2b000003 TUN/TAP TX queue length set to 100\n"
 2021-09-07T00:19:31.076Z DEBUG vopono::openvpn    > "1630973971.076054 1 /sbin/ip link set dev tun0 up mtu 1500\n"
 2021-09-07T00:19:31.077Z DEBUG vopono::openvpn    > "1630973971.077393 1 /sbin/ip addr add dev tun0 10.8.1.3/24 broadcast 10.8.1.255\n"
 2021-09-07T00:19:31.078Z DEBUG vopono::openvpn    > "1630973971.078515 3 /sbin/ip route add 45.248.77.187/32 via 10.200.1.1\n"
 2021-09-07T00:19:31.079Z DEBUG vopono::openvpn    > "1630973971.079657 3 /sbin/ip route add 0.0.0.0/1 via 10.8.1.1\n"
 2021-09-07T00:19:31.080Z DEBUG vopono::openvpn    > "1630973971.080727 3 /sbin/ip route add 128.0.0.0/1 via 10.8.1.1\n"
 2021-09-07T00:19:31.081Z DEBUG vopono::openvpn    > "1630973971.081696 1 Init"
 2021-09-07T00:19:31.081Z DEBUG vopono::openvpn    > "ialization Sequence Completed\n"

Could I be doing something wrong? There are no other running programs using either OpenVPN or Vopono, and my server is 100% online, as I'm SSH-ing into it while it's running a few hundred kilometres away at a friend's house.

Thanks in advance for any help!

Edit: I also tried running it with --firewall iptables - still had the same result, stuck on "Initialization Sequence Completed".

@jamesmcm
Copy link
Owner

jamesmcm commented Sep 7, 2021

Interesting, could you also try with --no-killswitch ? Just to remove any issues there.

It seems like the issue might be the way it is splitting the "Initialization Sequence Completed" message. As it checks for that directly -

if buffer.contains("Initialization Sequence Completed")

Could you check the log file too when running it? In /etc/netns/vopono_nordvpn_australia-au631.ovpn/openvpn.log to see if it is also breaking the line there?

@pigeonburger
Copy link
Author

Thanks for the fast reply!! Unfortunately adding --no-killswitch still yielded the same issue.

Yeah, I thought it was weird that it was splitting the last line like that, but the logfile shows it as normal (here's the last part of it):

1631006562.082859 1 TUN/TAP device tun0 opened
1631006562.082874 2b000003 TUN/TAP TX queue length set to 100
1631006562.082898 1 /sbin/ip link set dev tun0 up mtu 1500
1631006562.084176 1 /sbin/ip addr add dev tun0 10.8.2.4/24 broadcast 10.8.2.255
1631006562.085327 3 /sbin/ip route add 45.248.77.187/32 via 10.200.1.1
1631006562.086156 3 /sbin/ip route add 0.0.0.0/1 via 10.8.2.1
1631006562.086927 3 /sbin/ip route add 128.0.0.0/1 via 10.8.2.1
1631006562.087837 1 Initialization Sequence Completed

@jamesmcm
Copy link
Owner

jamesmcm commented Sep 7, 2021

I still think the log parsing is the issue, if the buffer is being split right in the middle there, like it could just be bad luck that the log length is just enough to do that.

A simple "fix" might be to increase the buffer size here to 8192 for example and try again.

let mut buffer = String::with_capacity(1024);

You can build it from source with Rustup - https://rustup.rs/

rustup toolchain install stable
rustup default stable
cargo build
./target/debug/vopono

In general I'm not sure what the best solution is for large log files. Since we only read it once, and read it forwards - and that is the issue here, like it reads once, happens to split the 1024 bytes in the middle of the phrase it is looking for, then clears the buffer and just reads the few remaining ones repeatedly.

I think the simplest option is just to increase the buffer size since the log files aren't like megabytes in size (at least in the little part before initialisation that we care about), so memory usage isn't really an issue.

Could you try to build it and test it with the larger buffer size please? As it's hard to test this since it depends on the length of the log from OpenVPN.

@pigeonburger
Copy link
Author

pigeonburger commented Sep 8, 2021

After compiling with a buffer size of 8192 bytes, it's still splitting that one line :(

2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > Set OpenVPN DNS to: 103.86.96.100
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322869 22000003 OPTIONS IMPORT: timers and/or timeouts modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322875 22000003 OPTIONS IMPORT: explicit notify parm(s) modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322878 22000003 OPTIONS IMPORT: compression parms modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322882 22000003 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322891 2b000003 Socket Buffers: R=[212992->425984] S=[212992->425984]\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322894 22000003 OPTIONS IMPORT: --ifconfig/up options modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322897 22000003 OPTIONS IMPORT: route options modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322899 22000003 OPTIONS IMPORT: route-related options modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322902 22000003 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322905 22000003 OPTIONS IMPORT: peer-id set\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322908 22000003 OPTIONS IMPORT: adjusting link_mtu to 1657\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322911 22000003 OPTIONS IMPORT: data channel crypto options modified\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322915 14000002 Data Channel: using negotiated cipher 'AES-256-GCM'\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322991 14000002 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.322999 14000002 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.323102 3 ROUTE_GATEWAY 10.200.1.1/255.255.255.0 IFACE=nordvpn_austr_s HWADDR=c6:bc:54:5d:6c:b6\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.323312 1 TUN/TAP device tun0 opened\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.323336 2b000003 TUN/TAP TX queue length set to 100\n"
 2021-09-08T00:03:55.323Z DEBUG vopono::openvpn    > "1631059435.323353 1 /sbin/ip link set dev tun0 up mtu 1500\n"
 2021-09-08T00:03:55.324Z DEBUG vopono::openvpn    > "1631059435.324742 1 /sbin/ip addr add dev tun0 10.8.3.4/24 broadcast 10.8.3.255\n"
 2021-09-08T00:03:55.325Z DEBUG vopono::openvpn    > "1631059435.325753 3 /sbin/ip route add 45.248.77.187/32 via 10.200.1.1\n"
 2021-09-08T00:03:55.326Z DEBUG vopono::openvpn    > "1631059435.326798 3 /sbin/ip route add 0.0.0.0/1 via 10.8.3.1\n"
 2021-09-08T00:03:55.327Z DEBUG vopono::openvpn    > "1631059435.327771 3 /sbin/ip route add 128.0.0.0/1 via 10.8.3.1\n"
 2021-09-08T00:03:55.328Z DEBUG vopono::openvpn    > "1631059435.328710 1 Init"
 2021-09-08T00:03:55.328Z DEBUG vopono::openvpn    > "ialization Sequence Completed\n"

It makes sense that that's what could be causing the issue, but I have only a little experience with Rust, so I have no idea why it could be happening.

I should also note that I'm not having this issue when I provide a NordVPN config file as a custom OpenVPN connection, like:

vopono exec --custom au594.nordvpn.com.udp.ovpn --protocol openvpn "curl ifconfig.co/country"

The above command will work fine without any issues whatsoever.

@jamesmcm
Copy link
Owner

jamesmcm commented Sep 8, 2021

Hmm, I think it's clearing the buffer every time. Try also commenting out line 115:

buffer.clear();

@pigeonburger
Copy link
Author

Hey, sorry for the late reply, I had a bunch of exams to revise for, but I just built it with a buffer of 8192 and commented out line 115 and it worked! Thanks so much for your help!

@jamesmcm
Copy link
Owner

Thanks for trying it, I will patch it here too.

jamesmcm added a commit that referenced this issue Sep 12, 2021
And do not clear the buffer to prevent splitting on the messages we need
#102
@jamesmcm
Copy link
Owner

jamesmcm commented Sep 12, 2021

It's updated on the AUR now btw - https://aur.archlinux.org/packages/vopono-bin/

And the deb packages are on the release page: https://github.com/jamesmcm/vopono/releases/tag/0.8.5

@pigeonburger
Copy link
Author

Great - appreciate it!

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

2 participants