Skip to content

Commit

Permalink
Enable default IPV6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ellermister committed Nov 26, 2023
1 parent 3094cb8 commit e5f0423
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Telegram 群组:https://t.me/EllerHK

```bash
rm -rf /home/mtproxy && mkdir /home/mtproxy && cd /home/mtproxy
curl -sL -o mtproxy.sh https://github.com/ellermister/mtproxy/raw/master/mtproxy.sh
curl -fsSL -o mtproxy.sh https://github.com/ellermister/mtproxy/raw/master/mtproxy.sh
bash mtproxy.sh
```

Expand Down Expand Up @@ -62,7 +62,7 @@ docker run -d \
-e domain="cloudflare.com" \
-p 8080:80 \
-p 8443:443 \
ellermister/mtproxy
ellermister/mtproxy:master
```
**镜像默认开启了 IP 段白名单**,如果你不需要可以配置 `ip_white_list="OFF"` 取消:

Expand All @@ -75,7 +75,7 @@ docker run -d \
-e ip_white_list="OFF" \
-p 8080:80 \
-p 8443:443 \
ellermister/mtproxy
ellermister/mtproxy:master
```

`ip_white_list` 选项:
Expand Down
4 changes: 2 additions & 2 deletions mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,15 @@ run_mtp() {
client_secret="ee${secret}${domain_hex}"
# ./mtg simple-run -n 1.1.1.1 -t 30s -a 512kib 0.0.0.0:$port $client_secret >/dev/null 2>&1 &
[[ -f "./mtg" ]] || (echo -e "提醒:\033[33m MTProxy 代理程序不存在请重新安装! \033[0m" && exit 1)
./mtg run $client_secret $proxy_tag -b 0.0.0.0:$port --multiplex-per-connection 500 >/dev/null 2>&1 &
./mtg run $client_secret $proxy_tag -b 0.0.0.0:$port --multiplex-per-connection 500 --prefer-ip=ipv6 >/dev/null 2>&1 &
else
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
nat_info=$(get_nat_ip_param)
workerman=$(get_cpu_core)
tag_arg=""
[[ -n "$proxy_tag" ]] && tag_arg="-P $proxy_tag"
./mtproto-proxy -u nobody -p $web_port -H $port -S $secret --aes-pwd proxy-secret proxy-multi.conf -M $workerman $tag_arg --domain $domain $nat_info >/dev/null 2>&1 &
./mtproto-proxy -u nobody -p $web_port -H $port -S $secret --aes-pwd proxy-secret proxy-multi.conf -M $workerman $tag_arg --domain $domain $nat_info --ipv6 >/dev/null 2>&1 &
fi

echo $! >$pid_file
Expand Down

0 comments on commit e5f0423

Please sign in to comment.