Skip to content

Commit

Permalink
add custom port support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Aug 3, 2024
1 parent 64bb6e6 commit eafd58d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,26 @@ The above command will add a little encryption to the existed socks connection,

Run, `curl -U "monius:passwd" -x "socks5h://127.0.0.1:9091" -fsSL "https://www.cloudflare.com/cdn-cgi/trace"` to go 🤗

#### 1.4 🔧 Pre-Configuration Start (advanced)
#### 1.4 🪡 Custom Port(Advanced)

Run the following commands in your terminal:

```bash
docker run --privileged --restart=always -itd \
--name warp_socks_passwd \
-e NET_PORT=8091 \
--cap-add NET_ADMIN \
--cap-add SYS_MODULE \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
--sysctl net.ipv4.conf.all.src_valid_mark=1 \
-v /lib/modules:/lib/modules \
-p 8091:8091 \
monius/docker-warp-socks
```

Run, `curl -x "socks5h://127.0.0.1:8091" -fsSL "https://www.cloudflare.com/cdn-cgi/trace"` to go 🤗

#### 1.5 🔧 Pre-Configuration Start (advanced)

To use your prepared config:

Expand Down
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ set -e
sleep 3

_NET_DEV=warp
_NET_PORT=9091

NET_DEV="${NET_DEV:-$_NET_DEV}"
NET_PORT="${NET_PORT:-$_NET_PORT}"

_WG_CONF="/etc/wireguard"
_IFACE=$(ip route show default | awk '{print $5}')

Expand Down Expand Up @@ -33,7 +37,7 @@ if [ ! -e "/opt/danted.conf" ]; then

cat <<EOF | tee /opt/danted.conf
logoutput: stderr
internal: 0.0.0.0 port=9091
internal: 0.0.0.0 port=$NET_PORT
external: $NET_DEV
user.unprivileged: nobody
Expand Down

0 comments on commit eafd58d

Please sign in to comment.