Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Does Killswitch not work or did I wrongly configure? #99

Open
Huddling1705 opened this issue Oct 15, 2024 · 1 comment
Open

Does Killswitch not work or did I wrongly configure? #99

Huddling1705 opened this issue Oct 15, 2024 · 1 comment

Comments

@Huddling1705
Copy link

I more or less replicated your config for vpn-testing and when I look at the logs of vpntest, it shows that it is able to connect using my non vpn-ed connection (censored one with exact location/ starting with 84.) before the VPN connection (non-censored one starting with 37.) is established.

Did I configure anything wrong or might there be a problem with the killswitch?

(Yes, I tested without the ENABLE_KILL_SWITCH variable, as this is supposed to be on by default. true was the value I found in the source code, so I put it to be able to remember that this container supports killswitch)

docker-compose.yml

services:
 
    surfshark:
        image: ilteoood/docker-surfshark
        container_name: surfshark
        environment: 
            - SURFSHARK_USER=myusername
            - SURFSHARK_PASSWORD=mypassword
            - SURFSHARK_COUNTRY=de
            - SURFSHARK_CITY=ber
            - CONNECTION_TYPE=udp
            - ENABLE_KILL_SWITCH=true
        cap_add: 
            - NET_ADMIN
        devices:
            - /dev/net/tun
        restart: unless-stopped
        dns:
            - 1.1.1.1


    vpntest:
        image: byrnedo/alpine-curl
        container_name: vpntest
        command: -L 'https://ipinfo.io'
        depends_on: 
            - surfshark
        network_mode: service:surfshark
        restart: always

console output

myusername@devicename:~$ sudo docker compose up -d
[+] Running 4/4
 ✔ Network myusername_default  Created                                                                                                                                                     0.1s
 ✔ Container samba        Started                                                                                                                                                     0.3s
 ✔ Container surfshark    Started                                                                                                                                                     0.3s
 ✔ Container vpntest      Started                                                                                                                                                     0.3s
myusername@devicename:~$ sudo docker logs vpntest
{
  "ip": "84.xxx.xxx.xxx",
  "hostname": "xxx.dip0.t-ipconnect.de",
  "city": "cityname",
  "region": "regionname",
  "country": "DE",
  "loc": "coordinates",
  "org": "ISPs name",
  "postal": "ZIP code",
  "timezone": "Europe/Berlin",
  "readme": "https://ipinfo.io/missingauth"
  
[ 2 more times the same log]

{
  "ip": "37.120.217.xxx",
  "city": "Frankfurt am Main",
  "region": "Hesse",
  "country": "DE",
  "loc": "50.1155,8.6842",
  "org": "AS9009 M247 Europe SRL",
  "postal": "60306",
  "timezone": "Europe/Berlin",
  "readme": "https://ipinfo.io/missingauth"
[same log follows from now on]
@ilteoood
Copy link
Owner

Sorry for the delay.
Technically speaking it should work out of the box.

Do you have a reproducible example, just to understand why it's not working for you?

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

No branches or pull requests

2 participants