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

shadowsocks: cannot obtain target address: unexpected EOF #233

Closed
csrednicki opened this issue Sep 7, 2020 · 9 comments
Closed

shadowsocks: cannot obtain target address: unexpected EOF #233

csrednicki opened this issue Sep 7, 2020 · 9 comments

Comments

@csrednicki
Copy link

csrednicki commented Sep 7, 2020

Hi, I am using docker-compose version and been trying to use socks service. Unfortunately everytime I try to use socks5 connection I get in logs this error
shadowsocks: cannot obtain target address: unexpected EOF.
In browser proxy configuration I enter ip adress of docker host (from pool 192.168.1.0/24) and shadowsocks port.

Here's my docker-compose.yml

version: "3.7"
services:
  gluetun:
    image: qmcgaw/private-internet-access
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    network_mode: bridge
    ports:
      - 8888:8888/tcp # Tinyproxy
      - 8388:8388/tcp # Shadowsocks
      - 8388:8388/udp # Shadowsocks
      - 8000:8000/tcp # Built-in HTTP control server
    # command:
    volumes:
      - /mnt/sdb/gluetun:/gluetun
    environment:
      - SHADOWSOCKS=on
      - SHADOWSOCKS_LOG=on

      # More variables are available, see the readme table
      - VPNSP=nordvpn

      # Timezone for accurate logs times
      - TZ=Europe/Warsaw

      # All VPN providers
      - USER=XXXXXXXXXXXXXXXXXXXXXXXXXX

      # All VPN providers but Mullvad
      - PASSWORD=XXXXXXXXXXXXXXXXXXXXX

      # Cyberghost only
      - CLIENT_KEY=

      # All VPN providers but Mullvad
      - REGION=Poland

      # Mullvad only
      - COUNTRY=Poland

      # Allow for example your LAN, set to: 192.168.1.0/24
      - EXTRA_SUBNETS=192.168.1.0/24
    restart: always

Here's output log

Recreating gluetun ... done
Attaching to gluetun
gluetun    | =========================================
gluetun    | ================ Gluetun ================
gluetun    | =========================================
gluetun    | ==== A mix of OpenVPN, DNS over TLS, ====
gluetun    | ======= Shadowsocks and Tinyproxy =======
gluetun    | ========= all glued up with Go ==========
gluetun    | =========================================
gluetun    | =========== For tunneling to ============
gluetun    | ======== your favorite VPN server =======
gluetun    | =========================================
gluetun    | === Made with ❤️  by github.com/qdm12 ====
gluetun    | =========================================
gluetun    |
gluetun    | Running version latest built on 2020-09-05T16:57:43Z (commit 797fa33)
gluetun    |
gluetun    | 📣  Persistent server IP addresses at /gluetun/servers.json, please BIND MOUNT
gluetun    |
gluetun    | 🔧  Need help? https://github.com/qdm12/gluetun/issues/new
gluetun    | 💻  Email? quentin.mcgaw@gmail.com
gluetun    | ☕  Slack? Join from the Slack button on Github
gluetun    | 💸  Help me? https://github.com/sponsors/qdm12
gluetun    | 2020-09-07T13:14:07.746+0200  INFO OpenVPN version: 2.4.9
gluetun    | 2020-09-07T13:14:07.747+0200  INFO Unbound version: 1.10.1
gluetun    | 2020-09-07T13:14:07.748+0200  INFO IPtables version: v1.8.4
gluetun    | 2020-09-07T13:14:07.770+0200  INFO TinyProxy version: 1.10.0
gluetun    | 2020-09-07T13:14:07.771+0200  INFO Settings summary below:
gluetun    | OpenVPN settings:
gluetun    | |--User: [redacted]
gluetun    | |--Password: [redacted]
gluetun    | |--Verbosity level: 1
gluetun    | |--Run as root: no
gluetun    | |--Nordvpn settings:
gluetun    |  |--Network protocol: udp
gluetun    |  |--Region: poland
gluetun    |  |--Number:
gluetun    | System settings:
gluetun    | |--User ID: 1000
gluetun    | |--Group ID: 1000
gluetun    | |--Timezone: europe/warsaw
gluetun    | |--IP Status filepath: /tmp/gluetun/ip
gluetun    | DNS over TLS settings:
gluetun    |  |--DNS over TLS provider:
gluetun    |   |--cloudflare
gluetun    |  |--Caching: enabled
gluetun    |  |--Block malicious: enabled
gluetun    |  |--Block surveillance: disabled
gluetun    |  |--Block ads: disabled
gluetun    |  |--Allowed hostnames:
gluetun    |   |--
gluetun    |  |--Private addresses:
gluetun    |   |--127.0.0.1/8
gluetun    |   |--10.0.0.0/8
gluetun    |   |--172.16.0.0/12
gluetun    |   |--192.168.0.0/16
gluetun    |   |--169.254.0.0/16
gluetun    |   |--::1/128
gluetun    |   |--fc00::/7
gluetun    |   |--fe80::/10
gluetun    |   |--::ffff:0:0/96
gluetun    |  |--Verbosity level: 1/5
gluetun    |  |--Verbosity details level: 0/4
gluetun    |  |--Validation log level: 0/2
gluetun    |  |--IPv6 resolution: disabled
gluetun    |  |--Update: every 24h0m0s
gluetun    |  |--Keep nameserver (disabled blocking): no
gluetun    | Firewall settings:
gluetun    |  |--Allowed subnets: 192.168.1.0/24
gluetun    |  |--VPN input ports:
gluetun    | TinyProxy settings: disabled
gluetun    | ShadowSocks settings:
gluetun    |  |--Password: [redacted]
gluetun    |  |--Log: enabled
gluetun    |  |--Port: 8388
gluetun    |  |--Method: chacha20-ietf-poly1305
gluetun    | Public IP check period: 12h0m0s
gluetun    | Version information: enabled
gluetun    |
gluetun    | 2020-09-07T13:14:07.772+0200  INFO storage: Merging by most recent 6355 hardcoded servers and 0 servers read from /gluetun/serve                           rs.json
gluetun    | 2020-09-07T13:14:07.798+0200  INFO routing: default route found: interface eth0, gateway 172.17.0.1
gluetun    | 2020-09-07T13:14:07.799+0200  INFO routing: local subnet found: 172.17.0.0/16
gluetun    | 2020-09-07T13:14:07.799+0200  INFO openvpn configurator: checking for device /dev/net/tun
gluetun    | 2020-09-07T13:14:07.799+0200  WARN TUN device is not available: open /dev/net/tun: no such file or directory
gluetun    | 2020-09-07T13:14:07.799+0200  INFO openvpn configurator: creating /dev/net/tun
gluetun    | 2020-09-07T13:14:07.799+0200  INFO firewall: enabling...
gluetun    | 2020-09-07T13:14:07.813+0200  INFO firewall: enabled successfully
gluetun    | 2020-09-07T13:14:07.813+0200  INFO firewall: setting allowed subnets through firewall...
gluetun    | 2020-09-07T13:14:07.815+0200  INFO routing: adding 192.168.1.0/24 as route via 172.17.0.1 eth0
gluetun    | 2020-09-07T13:14:07.816+0200  INFO Launching standard output merger
gluetun    | 2020-09-07T13:14:07.816+0200  INFO dns over tls: falling back on plaintext DNS at address 1.1.1.1
gluetun    | 2020-09-07T13:14:07.817+0200  INFO dns configurator: using DNS address 1.1.1.1 internally
gluetun    | 2020-09-07T13:14:07.817+0200  INFO dns configurator: using DNS address 1.1.1.1 system wide
gluetun    | 2020-09-07T13:14:07.817+0200  INFO http server: listening on 0.0.0.0:8000
gluetun    | 2020-09-07T13:14:07.818+0200  INFO firewall: setting VPN connections through firewall...
gluetun    | 2020-09-07T13:14:07.908+0200  INFO openvpn configurator: starting openvpn
gluetun    | 2020-09-07T13:14:07.908+0200  INFO firewall: setting allowed input port 8388 through interface eth0...
gluetun    | 2020-09-07T13:14:07.910+0200  INFO openvpn: OpenVPN 2.4.9 x86_64-alpine-linux-musl [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTIN                           FO] [AEAD] built on Apr 20 2020
gluetun    | 2020-09-07T13:14:07.910+0200  INFO openvpn: library versions: OpenSSL 1.1.1g  21 Apr 2020, LZO 2.10
gluetun    | 2020-09-07T13:14:07.911+0200  INFO shadowsocks: listening TCP on 0.0.0.0:8388
gluetun    | 2020-09-07T13:14:07.911+0200  INFO shadowsocks: listening UDP on 0.0.0.0:8388
gluetun    | 2020-09-07T13:14:07.912+0200  WARN openvpn: --ping should normally be used with --ping-restart or --ping-exit
gluetun    | 2020-09-07T13:14:07.914+0200  INFO openvpn: TCP/UDP: Preserving recently used remote address: [AF_INET]37.120.211.155:1194
gluetun    | 2020-09-07T13:14:07.914+0200  INFO openvpn: UDP link local: (not bound)
gluetun    | 2020-09-07T13:14:07.914+0200  INFO openvpn: UDP link remote: [AF_INET]37.120.211.155:1194
gluetun    | 2020-09-07T13:14:08.290+0200  INFO openvpn: [pl170.nordvpn.com] Peer Connection Initiated with [AF_INET]37.120.211.155:1194
gluetun    | 2020-09-07T13:14:09.397+0200  INFO openvpn: TUN/TAP device tun0 opened
gluetun    | 2020-09-07T13:14:09.397+0200  INFO openvpn: /sbin/ip link set dev tun0 up mtu 1500
gluetun    | 2020-09-07T13:14:09.398+0200  INFO openvpn: /sbin/ip addr add dev tun0 10.8.3.6/24 broadcast 10.8.3.255
gluetun    | 2020-09-07T13:14:09.401+0200  INFO openvpn: UID set to nonrootuser
gluetun    | 2020-09-07T13:14:09.401+0200  INFO openvpn: Initialization Sequence Completed
gluetun    | 2020-09-07T13:14:09.401+0200  INFO dns configurator: downloading root hints from https://raw.githubusercontent.com/qdm12/files/m                           aster/named.root.updated
gluetun    | 2020-09-07T13:14:09.401+0200  INFO routing: default route found: interface eth0, gateway 172.17.0.1
gluetun    | 2020-09-07T13:14:09.401+0200  INFO Gateway VPN IP address: 37.120.211.155
gluetun    | 2020-09-07T13:14:09.779+0200  INFO ip getter: Public IP address is 37.120.211.156
gluetun    | 2020-09-07T13:14:09.851+0200  INFO dns configurator: downloading root key from https://raw.githubusercontent.com/qdm12/files/mas                           ter/root.key.updated
gluetun    | 2020-09-07T13:14:09.869+0200  INFO You are running on the bleeding edge of latest!
gluetun    | 2020-09-07T13:14:09.916+0200  INFO dns configurator: generating Unbound configuration
gluetun    | 2020-09-07T13:14:10.383+0200  INFO dns configurator: 61358 hostnames blocked overall
gluetun    | 2020-09-07T13:14:10.383+0200  INFO dns configurator: 2581 IP addresses blocked overall
gluetun    | 2020-09-07T13:14:10.424+0200  INFO dns configurator: starting unbound
gluetun    | 2020-09-07T13:14:10.424+0200  INFO dns configurator: using DNS address 127.0.0.1 internally
gluetun    | 2020-09-07T13:14:10.424+0200  INFO dns configurator: using DNS address 127.0.0.1 system wide
gluetun    | 2020-09-07T13:14:10.656+0200  INFO unbound: init module 0: validator
gluetun    | 2020-09-07T13:14:10.657+0200  INFO unbound: init module 1: iterator
gluetun    | 2020-09-07T13:14:10.712+0200  INFO unbound: start of service (unbound 1.10.1).
gluetun    | 2020-09-07T13:14:10.965+0200  INFO unbound: generate keytag query _ta-4a5c-4f66. NULL IN
gluetun    | 2020-09-07T13:14:50.614+0200  ERROR  shadowsocks: cannot obtain target address: unexpected EOF
gluetun    | 2020-09-07T13:15:20.618+0200  ERROR  shadowsocks: cannot obtain target address: unexpected EOF
gluetun    | 2020-09-07T13:15:20.771+0200  ERROR  shadowsocks: cannot obtain target address: unexpected EOF
gluetun    | 2020-09-07T13:15:31.712+0200  ERROR  shadowsocks: cannot obtain target address: unexpected EOF
gluetun    | 2020-09-07T13:15:55.866+0200  ERROR  shadowsocks: cannot obtain target address: unexpected EOF
@qdm12
Copy link
Owner

qdm12 commented Sep 7, 2020

Can you please send your Shadowsocks client configuration (or screenshot)? What's your SS client also? I just tested shadowsocks (for windows) yesterday and it worked for me, but it might be a bug on my side happening for your particular client. Thanks!

@csrednicki
Copy link
Author

I was trying to use it with chrome browser as socks5 proxy. I am using SwitchySharp plugin. Configuration below.
image
Am I using it right? I assumed that this was simple socks5 proxy.

@qdm12
Copy link
Owner

qdm12 commented Sep 7, 2020

It should be a socks5 proxy indeed. Did you set the encryption method and password somewhere? I'll try with your chrome extension to see as well.

@frepke
Copy link
Collaborator

frepke commented Sep 7, 2020

I was trying to use it with chrome browser as socks5 proxy. I am using SwitchySharp plugin. Configuration below.
image
Am I using it right? I assumed that this was simple socks5 proxy.

Your proxyserver has address 192.168.1.27 and you set no proxy for 192.168.1.0/24.
Seems wrong to me.

@csrednicki
Copy link
Author

@frepke

Your proxyserver has address 192.168.1.27 and you set no proxy for 192.168.1.0/24.
Seems wrong to me.

According to your proposal I changed the configuration. Unfortunately, it did not work. I still have the same error.
shadowsocks: cannot obtain target address: unexpected EOF

image

@csrednicki
Copy link
Author

I tried also using "private internet access" vpn account. Same error. This leads me to thinking that it is not vpn provider specific.

@csrednicki
Copy link
Author

csrednicki commented Sep 7, 2020

@qdm12

It should be a socks5 proxy indeed. Did you set the encryption method and password somewhere? I'll try with your chrome extension to see as well.

No, I did not set encryption method or password.

@qdm12
Copy link
Owner

qdm12 commented Sep 7, 2020

Ok so actually (sorry I should had known that!), Shadowsocks uses the open source SOCKS5 proxy protocol to communicate, but it adds some encryption on top. So you won't be able to use it as a SOCKS5 proxy server only, you will need some Shadowsocks client. However, considering we mostly use it in our LAN I'll work on adding a SOCKS5 non-encrypted proxy server too, please subscribe to issue #234 for that. For now, you can alternatively use Tinyproxy as an HTTP proxy.

@qdm12 qdm12 closed this as completed Sep 7, 2020
@csrednicki
Copy link
Author

Ok so actually (sorry I should had known that!), Shadowsocks uses the open source SOCKS5 proxy protocol to communicate, but it adds some encryption on top. So you won't be able to use it as a SOCKS5 proxy server only, you will need some Shadowsocks client. However, considering we mostly use it in our LAN I'll work on adding a SOCKS5 non-encrypted proxy server too, please subscribe to issue #234 for that. For now, you can alternatively use Tinyproxy as an HTTP proxy.

Oh, I did not know that. Thank you. I will subscribe to issue you mentioned. For now I will use HTTP Proxy.

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