@@ -214,3 +214,121 @@ jobs:
214
214
echo "Ingore failure until https://github.com/daeuniverse/dae/issues/387 is resolved"
215
215
true
216
216
fi
217
+
218
+ - name : Setup LAN
219
+ uses : cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
220
+ with :
221
+ provision : ' false'
222
+ cmd : |
223
+ set -ex
224
+ cd /host
225
+
226
+ docker restart -t0 dae
227
+ docker exec dae apt install -y iproute2 iptables iputils-ping
228
+
229
+ cat >lan.bash <<!
230
+ set -ex
231
+
232
+ ip net a dae
233
+ ip l a dae-veth type veth peer name dae-veth-peer
234
+ ip l s dae-veth-peer up
235
+ ip l s dae-veth netns dae
236
+ ip net e dae ip l s dae-veth up
237
+ ip r a 10.0.0.1 dev dae-veth-peer
238
+ ip net e dae ip a a 10.0.0.1 dev dae-veth
239
+ ip net e dae ip r a 169.254.0.1 dev dae-veth
240
+ ip net e dae ip r a default via 169.254.0.1 dev dae-veth
241
+
242
+ sysctl net.ipv6.conf.dae-veth-peer.disable_ipv6=0
243
+ ip -6 r a fd00:ffff::1 dev dae-veth-peer
244
+ ip -6 a a fe80::ecee:eeff:feee:eeee dev dae-veth-peer
245
+ ip net e dae ip -6 a a fd00:ffff::1 dev dae-veth
246
+ ip net e dae ip -6 r r default via fe80::ecee:eeff:feee:eeee dev dae-veth
247
+
248
+ sysctl net.ipv4.conf.dae-veth-peer.proxy_arp=1
249
+ sysctl net.ipv4.conf.dae-veth-peer.rp_filter=2
250
+ iptables-legacy -t nat -A POSTROUTING -s 10.0.0.1/32 -j MASQUERADE
251
+ !
252
+ docker exec dae bash /host/lan.bash
253
+
254
+ docker exec dae ping -c1 10.0.0.1
255
+ docker exec dae ip net e dae curl 1.0.0.1
256
+ docker exec dae ping -c1 fd00:ffff::1
257
+
258
+ docker exec dae sysctl net.ipv4.conf.dae-veth-peer.send_redirects=0
259
+ docker exec dae sysctl net.ipv6.conf.dae-veth-peer.forwarding=1
260
+
261
+ vmess_link=$(base64 -w0 vmess.json)
262
+ cat > ./conf.dae <<!
263
+ global {
264
+ tproxy_port: 12345
265
+ log_level: trace
266
+
267
+ lan_interface: dae-veth-peer
268
+ wan_interface: auto
269
+ allow_insecure: false
270
+ }
271
+
272
+ node {
273
+ local: 'vmess://\$vmess_link'
274
+ }
275
+
276
+ group {
277
+ proxy {
278
+ policy: min_moving_avg
279
+ }
280
+ }
281
+
282
+ routing {
283
+ pname(dae) -> direct
284
+ fallback: proxy
285
+ }
286
+ !
287
+
288
+ chmod 600 ./conf.dae
289
+ nohup docker exec dae /host/dae/dae run -c /host/conf.dae &> dae.log &
290
+ sleep 10s
291
+ cat dae.log
292
+
293
+ - name : Check LAN IPv4 TCP
294
+ uses : cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
295
+ with :
296
+ provision : ' false'
297
+ cmd : |
298
+ set -ex
299
+
300
+ docker exec dae ip net e dae curl 1.0.0.1
301
+ cat /host/dae.log | grep -F -- '-> 1.0.0.1:80'
302
+ cat /host/v2ray.access.log | grep -q 'accepted tcp:1.0.0.1:80'
303
+
304
+ - name : Check LAN IPv4 UDP
305
+ uses : cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
306
+ with :
307
+ provision : ' false'
308
+ cmd : |
309
+ set -ex
310
+
311
+ docker exec dae ip net e dae dig @8.8.4.4 one.one.one.one
312
+ cat /host/dae.log | grep -F -- '-> 8.8.4.4:80'
313
+ cat /host/v2ray.access.log | grep -q 'accepted udp:8.8.4.4:53'
314
+
315
+ - name : Check LAN IPv6 TCP
316
+ uses : cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
317
+ with :
318
+ provision : ' false'
319
+ cmd : |
320
+ set -ex
321
+
322
+ docker exec dae ip net e dae nc -v -w1 2606:4700:4700::1001 80 &> /host/nc.log
323
+ cat /host/nc.log | grep -q 'succeeded!'
324
+ cat /host/dae.log | grep -F -- '-> [2606:4700:4700::1001]:80'
325
+
326
+ - name : Check LAN IPv6 UDP
327
+ uses : cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
328
+ with :
329
+ provision : ' false'
330
+ cmd : |
331
+ set -ex
332
+
333
+ docker exec dae ip net e dae dig @2001:4860:4860::8844 one.one.one.one
334
+ cat /host/dae.log | grep -F -- '-> [2001:4860:4860::8844]:53'
0 commit comments