Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Local server docker-compose.yml, raspberry pi 4b
- name: client
- services:
- client:
- image: archef2000/rathole
- container_name: rathole
- command: client
- environment:
- - ADDRESS=vps-ip:2333
- # vpn
- - SERVICE_NAME_1=vpn
- - SERVICE_TOKEN_1=token
- - SERVICE_ADDRESS_1=192.168.x.x:51820
- - SERVICE_TYPE_1=udp
- # something
- - SERVICE_NAME_2=something
- - SERVICE_TOKEN_2=something
- - SERVICE_ADDRESS_2=192.168.x.x:8080
- - SERVICE_TYPE_2=tcp
- restart: unless-stopped
- vpn:
- image: lscr.io/linuxserver/wireguard
- container_name: wireguard
- cap_add:
- - NET_ADMIN
- - SYS_MODULE
- environment:
- - PUID=1000
- - PGID=1000
- - TZ=America/Argentina/Buenos_Aires
- - SERVERURL=vps-ip
- - SERVERPORT=51820
- - PEERS=1
- - PEERDNS=auto
- - ALLOWEDIPS=0.0.0.0/0
- volumes:
- - ./wireguard/config:/config
- - /lib/modules:/lib/modules
- ports:
- - 51820:51820/udp
- sysctls:
- - net.ipv4.conf.all.src_valid_mark=1
- - net.ipv4.ip_forward=1
- // config.toml configuration file for rathole server in my VPS
- [server]
- bind_addr = "0.0.0.0:2333"
- [server.services.vpn]
- token = "token"
- bind_addr = "0.0.0.0:51820"
- type = "udp"
- [server.services.something]
- token = "something"
- bind_addr = "0.0.0.0:8080"
- type = "tcp"
- // docker-compose.yml in vps
- name: server
- services:
- server:
- image: rapiz1/rathole
- container_name: rathole
- ports:
- - 2333:2333
- - 51820:51820/udp
- - 8080:8080/tcp
- volumes:
- - ./config.toml:/app/config.toml
- command: ["--server", "/app/config.toml"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement