但下面的 docker 的 container 无法走透明代理, 搜索了一番, 应该是要把 docker 网络指定为 --net host, 只是 docker-compose.yml 如何修改就不知道了, 一会 append 上 docker-compose.yml 文件,哪位大佬帮忙改下, 谢谢
1
wheat0r 181 天前
network_mode: "host"
这个问题是不是谷歌就知道? |
2
ExplodingFKL 181 天前 1
网桥的流量默认不过 iptables
|
3
heiher 181 天前 via Android
sysctl -a | grep bridge-nf-call 把这些都配成 0 。
|
4
Jacksu 181 天前
如果你不需要限制容器的网络访问,在系统配置/etc/sysctl.conf 添加下面两行就行了
net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-ip6tables = 0 |
6
KINGWAY OP @heiher #3 nano /etc/sysctl.conf
net.bridge.bridge-nf-call-iptables = 0 net.bridge.bridge-nf-call-ip6tables=0 net.bridge.bridge-nf-call-arptables=0 还是不行 |
7
Charlie17Li 180 天前
请问宿主机是 Mac 吗,Linux 的话直接「宿主机 IP:代理端口」 不行吗
|
9
heiher 180 天前
|
10
KINGWAY OP @Charlie17Li #7 宿主机是 debian, 你说的宿主机 ip:代理端口是在 container 中设置?
我在研究这个文章看如何对已经跑起来的服务进行补救: https://wiki.eryajf.net/pages/674f53/#%E6%96%B9%E6%A1%88%E4%BA%8C |
11
Andim 180 天前
如果你的 docker 已经运行了,可以试下把 transparent proxy 换成 dae 实现
https://github.com/daeuniverse/dae 如果还没运行那就更好配置了,想办法把你的代理暴漏出一个 socks 端口, 然后 docker 配置文件里加上代理就可以了 |
16
Andim 180 天前
|
18
Andim 180 天前
@KINGWAY 是不是下错了?我试过,debian11 debian12 ,alpinelinux 都能直接运行呀
https://github.com/daeuniverse/dae/releases/download/v0.5.1/dae-linux-x86_64_v2_sse.zip |
19
Andim 180 天前
|
20
KINGWAY OP @Andim #18 docker 版本也不行, 试过了很多次了.
> [dae stage-1 5/8] RUN wget -O /usr/local/share/dae/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat: 0.387 Connecting to github.com (20.205.243.166:443) 10.59 wget: error getting response: Resource temporarily unavailable ------ failed to solve: process "/bin/sh -c wget -O /usr/local/share/dae/geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat" did not complete successfully: exit code: 1 |
21
Andim 177 天前
@KINGWAY 这提示你没有 geoip, geosite
https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202405182208/geosite.dat https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/202405182208/geoip.dat 似乎你那里 github 被墙了,你找个能访问 github 的设备上下载然后 SCP 传到这个设备就行了 然后放到你 dae 配置的同目录下就可以了 |
22
KINGWAY OP @Andim #21 你说的我其实早意识到且解决了, 我用了 v2raya 先代理, 但是仍然不成功, 特别是 docker 跑的 dae, docker ps -a 是可以看到它起来, 但是你要 exec -it 进去的话, 它会提示一直在启动中, 表示服务无法用.
|
23
Andim 177 天前
@KINGWAY
看下日志 docker logs -f 另外你配置过程中有没有漏掉那一步? https://github.com/daeuniverse/dae/blob/main/docs/zh/README.md |
25
KINGWAY OP @Andim #23 time="May 19 11:24:03" level=info msg="192.168.2.99:35535 <-> 23.95.xxx.xxx:33333" dialer=23.95.xxx.xxx-PVE dscp=0 ip="23.95.xxx.xxx:33333" mac="30:bf:21:06:02:b6" network=tcp4 outbound="my_group" pid=0 pname=v2ray policy=min_moving_avg sniffed=
time="May 19 11:24:03" level=info msg="192.168.2.99:35513 <-> 23.95.xxx.xxx:33333" dialer=23.95.xxx.xxx-PVE dscp=0 ip="23.95.xxx.xxx:33333" mac="30:bf:21:06:02:b6" network=tcp4 outbound="my_group" pid=0 pname=v2ray policy=min_moving_avg sniffed= |
26
Andim 177 天前
@KINGWAY 再看下 dae docker 启动时的日志 有没有异常
docker stop dae truncate -s 0 $(docker inspect --format='{{.LogPath}}' dae) docker start dae docker logs -f dae |
27
KINGWAY OP @Andim #26 root@DATAHUB:/etc/dae# docker stop dae
truncate -s 0 $(docker inspect --format='{{.LogPath}}' dae) docker start dae docker logs -f dae dae dae time="May 19 12:08:03" level=info msg="Include config files: [/etc/dae/config.dae]" time="May 19 12:08:03" level=info msg="Waiting for network..." |
28
KINGWAY OP @Andim #26 time="May 19 12:14:21" level=info msg="Group 'my_group' [tcp6]:
1. [] 23.95.xxx.xxx-PVE: 4.611s" time="May 19 12:14:31" level=info msg="[ALIVE --tcp4-> NOT ALIVE]" dialer=23.95.xxx.xxx-PVE group="my_group" time="May 19 12:14:31" level=info msg="Group has no dialer alive" group="my_group" network=tcp4 time="May 19 12:14:36" level=warning msg="handlePkt: no proper dialer for DNS upstream: tcp+udp://dns.google.com:53" time="May 19 12:14:41" level=warning msg="handlePkt: no proper dialer for DNS upstream: tcp+udp://dns.google.com:53" time="May 19 12:14:46" level=warning msg="handlePkt: no proper dialer for DNS upstream: tcp+udp://dns.google.com:53" 我看了, 估计是电信屏蔽了 53 端口 |
29
Andim 177 天前
@KINGWAY dae 正常的初始化应该出现像下面的信息
time="May 19 12:17:17" level=info msg="Include config files: [/etc/dae/config.dae]" time="May 19 12:17:18" level=info msg="Loading eBPF programs and maps into the kernel..." time="May 19 12:17:18" level=info msg="The loading process takes about 120MB free memory, which will be released after loading. Insufficient memory will cause loading failure." time="May 19 12:17:46" level=info msg="Loaded eBPF programs and maps" time="May 19 12:17:46" level=info msg="Bind to LAN: ens192" time="May 19 12:17:46" level=info msg="Bind to WAN: ens192" time="May 19 12:17:46" level=info msg="Group "Proxys" node list:" 别外你也可以起个纯净的虚拟机重新测试配置,如果能启动,那么你的 配置过程就没有问题, 还有如果有配置 iptable 之类的规则有没有清除 |