enfein/mieru

看看有没有可能这样做 从hysteria的端口跳跃得到的灵感使用iptables + mita

xtccc opened this issue · 2 comments

xtccc commented

看看作者有没有这样做的可能?

从hysteria的端口跳跃得到的灵感

https://hysteria.network/zh/docs/advanced/Port-Hopping/
使用iptables + mita 可以更方便更节省内存的监听多端口

server:

iptables -t nat -A PREROUTING -i eth0 -p udp --dport 445:19999 -j DNAT --to-destination :444
ip6tables -t nat -A PREROUTING -i eth0 -p udp --dport 445:19999 -j DNAT --to-destination :444

mita.json:
不能用portRange ,原因不知道 不过也不需要 portRange了

"portBindings": [
    {
        "port": "444",
        "protocol": "UDP"
    }
],

client:
mieru.json:

 "portBindings": [
          {
              "portRange": "445-19999",
              "protocol": "UDP"
          }
  ]
enfein commented

理论上是可行的。

服务器是可以用 portRange 的,不过指定 445-19999 这么大的 portRange 可能不行,无法打开这么多文件。

另外最好不要用数字很大的端口号,这些端口服务器在向外建立连接的时候会用到。

This issue is stale because it has been open 80 days with no activity. Remove stale label or comment or this will be closed in 9 days.