引用自: ultra 于 十一月 14, 2018, 08:00:08 上午谢谢 ultra !
谢谢反馈,我们会再出一版把这个加进程序中自动运行。另外不使用 ifconfig, 用 "ip addr add", 这样,新版Linux就不需要安装 ifconfig 了。
引用
# lsof -S | grep TCP | grep 8888
u1805b 1739 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1740 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1741 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1742 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1743 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1744 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1745 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1746 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1775 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1791 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
u1805b 1739 1795 root 10u IPv4 30010 0t0 TCP *:8888 (LISTEN)
引用自: ultra 于 十一月 14, 2018, 04:20:16 上午谢谢 ultra !
全局代理失败可能是因为防火墙(iptables),能否试一下:
iptables -A INPUT -p TCP --dport 8888 -j ACCEPT
引用
# iptables -I INPUT 4 -p TCP --dport 8888 -j ACCEPT
# ip6tables -I INPUT 4 -p TCP --dport 8888 -j ACCEPT
引用
# cat /etc/resolv.conf
nameserver 10.11.0.2
nameserver 8.8.8.8
nameserver 8.8.4.4
引用
# nslookup www.freebsd.org
Server: 10.11.0.2
Address: 10.11.0.2#53
Non-authoritative answer:
www.freebsd.org canonical name = wfe0.nyi.freebsd.org.
Name: wfe0.nyi.freebsd.org
Address: 96.47.72.84
引用
# iptables -S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT ! -i lo -p tcp -m tcp --tcp-flags RST RST -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8888 -j ACCEPT
-A INPUT -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j DROP
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -o lo -j ACCEPT
-A OUTPUT -m state --state NEW -j ACCEPT
-A OUTPUT -j DROP
引用
# ip6tables -S
-P INPUT DROP
-P FORWARD DROP
-P OUTPUT DROP
-A INPUT ! -i lo -p tcp -m tcp --tcp-flags RST RST -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -s ::1/128 -d ::1/128 -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8888 -j ACCEPT
-A INPUT -j DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -j DROP
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -s ::1/128 -d ::1/128 -o lo -j ACCEPT
-A OUTPUT -m state --state NEW -j ACCEPT
-A OUTPUT -j DROP
引用(1),火狐浏览器 Firefox Quantum 60.3.0esr(64位) ,手动设置本地代理 127.0.0.1:9667,翻墙成功,
# ./u1805b -M vpn
0.256 Connecting ...
0.257 LISTENING 127.0.0.1:9667
VPN MODE
12.392 CONNECTED
606.720 Connecting ...
606.720 CONNECTED
引用
# cat /etc/resolv.conf
nameserver 10.11.0.2
nameserver 8.8.8.8
nameserver 8.8.4.4
引用
# nslookup https://www.freebsd.org
Server: 10.11.0.2
Address: 10.11.0.2#53
** server can't find https://www.freebsd.org: NXDOMAIN
引用
# nslookup www.freebsd.org
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
www.freebsd.org canonical name = wfe0.nyi.freebsd.org.
Name: wfe0.nyi.freebsd.org
Address: 96.47.72.84
引用
# ifconfig tun0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.151.166.123 netmask 255.255.255.255 destination 10.151.166.1
inet6 fe80::9d03:83f6:e7ac:87c7 prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 371 bytes 23133 (22.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 431 bytes 25957 (25.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
在 0.044 秒内创建了带有 18 查询的页面。