Chore: move to wiki

This commit is contained in:
xjasonlyu
2021-02-11 14:19:37 +08:00
parent e849c9a451
commit 04d0e1e9a7
2 changed files with 0 additions and 56 deletions
-41
View File
@@ -1,41 +0,0 @@
version: '2.4'
services:
tun2socks:
image: ghcr.io/xjasonlyu/tun2socks:latest
cap_add:
- NET_ADMIN
devices:
- '/dev/net/tun:/dev/net/tun'
environment:
- GODEBUG=madvdontneed=1
- LOGLEVEL=
- TUN=
- TUN_ADDR=
- PROXY=
- STATS=
- TOKEN=
- MTU=
- EXTRA_COMMANDS=
- TUN_INCLUDED_ROUTES=
- TUN_EXCLUDED_ROUTES=
networks:
switch:
ipv4_address: 172.20.1.2
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.rp_filter=0
restart: unless-stopped
container_name: tun2socks
networks:
switch:
name: switch
ipam:
driver: default
config:
- subnet: '172.20.1.0/25'
gateway: 172.20.1.1
driver: macvlan
driver_opts:
parent: eth0
-15
View File
@@ -1,15 +0,0 @@
#!/bin/sh
# Create the necessary file structure for /dev/net/tun
if [ ! -c /dev/net/tun ]; then
if [ ! -d /dev/net ]; then
mkdir -m 755 /dev/net
fi
mknod /dev/net/tun c 10 200
chmod 0755 /dev/net/tun
fi
# Load the tun module if not already loaded
if ( ! (lsmod | grep -q "^tun\s")); then
insmod /lib/modules/tun.ko
fi