全球主机交流论坛

标题: 有没有多IPV6出口一键脚本啊 [打印本页]

作者: AWM    时间: 2025-8-19 12:17
标题: 有没有多IPV6出口一键脚本啊
用来解决封IP或者限制流量(mega网盘)
作者: xszz    时间: 2025-8-19 12:22
多ipv6 一键切换主ip?
作者: AWM    时间: 2025-8-19 12:50
xszz 发表于 2025-8-19 12:22
多ipv6 一键切换主ip?

最好是随机切换IP或者xray节点切换
作者: WZ-Software    时间: 2025-8-19 14:02
就是选择特定的v6进行出口?
作者: AWM    时间: 2025-8-19 14:34
WZ-Software 发表于 2025-8-19 14:02
就是选择特定的v6进行出口?

就是利用IPV6/64子网手动或者随机切换出口IP
作者: haowan    时间: 2025-8-19 14:55

作者: haowan    时间: 2025-8-19 14:56
本帖最后由 haowan 于 2025-8-19 15:02 编辑

自己研究

1. 添加本地 IPv6 路由
首先为指定的 IPv6 子网添加本地路由,并允许非本地地址绑定:

ip route add local 2001:470:1f06:556::/64 dev fy
sysctl net.ipv6.ip_nonlocal_bind=1
ip route add local:为指定的 IPv6 子网添加本地路由。此命令让网络接口 fy 处理发往 2001:470:1f06:556::/64 的 IPv6 数据包。
sysctl net.ipv6.ip_nonlocal_bind=1:启用对非本地地址的绑定,允许绑定未分配给本地设备的 IPv6 地址。
2. 安装并配置 ndppd
ndppd 是一个代理,用于响应非本地地址的邻居发现协议 (NDP) 请求,确保指定的 IPv6 地址可以在局域网中响应。

安装 ndppd:

apt install ndppd
编辑配置文件:

vim /etc/ndppd.conf
配置示例:

route-ttl 30000

proxy enp1s0 {
    router no
    timeout 500
    ttl 30000
    rule 2001:470:1f06:556::/64 {
        static
    }
}
route-ttl 30000:设置路由缓存的生存时间 (TTL)。
proxy enp1s0:指定 enp1s0 接口代理 NDP 请求。该接口是局域网连接的接口。
rule 2001:470:1f06:556::/64:配置指定的 IPv6 前缀。static 规则表示该前缀将静态代理。
重启 ndppd 服务:

systemctl restart ndppd.service
3. x-ui 配置
x-ui 是管理代理服务器的图形界面工具,下面是配置规则的说明。

配置示例:

{
  "api": {
    "services": [
      "HandlerService",
      "LoggerService",
      "StatsService"
    ],
    "tag": "api"
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 62789,
      "protocol": "dokodemo-door",
      "settings": {
        "address": "127.0.0.1"
      },
      "tag": "api"
    },
    {
      "listen": "0.0.0.0",
      "port": 3333,
      "protocol": "http",
      "settings": {
        "accounts": [
          {
            "user": "XXXX",
            "pass": "XXXX"
          }
        ],
        "allowTransparent": false
      },
      "tag": "inbound-3333"
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "freedom",
      "sendThrough": "2001:470:1f06:556::/64",
      "settings": {},
      "tag": "randomip"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "blocked"
    }
  ],
  "policy": {
    "levels": {
      "0": {
        "handshake": 10,
        "connIdle": 300,
        "uplinkOnly": 2,
        "downlinkOnly": 3,
        "statsUserUplink": true,
        "statsUserDownlink": true,
        "bufferSize": 10240
      }
    },
    "system": {
      "statsInboundDownlink": true,
      "statsInboundUplink": true
    }
  },
  "routing": {
    "rules": [
      {
        "inboundTag": ["api"],
        "outboundTag": "direct",
        "type": "field"
      },
      {
        "ip": ["geoip:private"],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "protocol": ["bittorrent"],
        "outboundTag": "blocked",
        "type": "field"
      },
      {
        "inboundTag": ["inbound-3333"],
        "outboundTag": "randomip",
        "type": "field"
      }
    ]
  },
  "stats": {}
}
inbounds:定义监听的入站连接。
监听 127.0.0.1:62789,用于处理 API 请求。
监听 0.0.0.0:3333,用于 HTTP 代理服务,带有基本的用户名和密码认证。
outbounds:定义出站连接。
freedom:用于直接访问互联网。
randomip:通过指定的 2001:470:1f06:556::/64 地址段访问互联网。
blackhole:拦截和丢弃不合法的流量。
routing:定义流量路由规则。
流量根据入站标签和 IP 地址决定走向。Bittorrent 流量和私人 IP 流量会被丢弃。
4. x-ui 出站规则
出站服务器设置:

[
  {
    "protocol": "http",
    "settings": {
      "servers": [
        {
          "address": "x.x.x.x",
          "port": 3333,
          "users": [
            {
              "user": "XXXX",
              "pass": "XXXX"
            }
          ]
        },
        {
          "address": "x.x.x.x",
          "port": 3333,
          "users": [
            {
              "user": "XXXX",
              "pass": "XXXX"
            }
          ]
        }
      ]
    },
    "tag": "random",
    "strategy": {
      "type": "random"
    }
  }
]
servers:定义出站 HTTP 代理服务器,两个不同 IP 的服务器 x.x.x.x 和 x.x.x.x,使用相同的用户名和密码。
strategy:出站策略为随机选择 (random)。

作者: AWM    时间: 2025-8-19 15:10
haowan 发表于 2025-8-19 14:56
自己研究

1. 添加本地 IPv6 路由

搞的好复杂啊,配置100个IP配置文件不得写死个人啊
作者: haowan    时间: 2025-8-19 15:10
本帖最后由 haowan 于 2025-8-19 15:13 编辑
AWM 发表于 2025-8-19 15:10
搞的好复杂啊,配置100个IP配置文件不得写死个人啊


不用配置啊一个网卡配置文件就可以了。他是随机生成的。只要/64都是你的。
作者: AWM    时间: 2025-8-19 15:17
haowan 发表于 2025-8-19 15:10
不用配置啊一个网卡配置文件就可以了。他是随机生成的。只要/64都是你的。 ...

需要IPV6 routed吗?
作者: haowan    时间: 2025-8-19 15:17
AWM 发表于 2025-8-19 15:10
搞的好复杂啊,配置100个IP配置文件不得写死个人啊

1. 添加本地 IPv6 路由
命令: ip route add local 2001:470:1f06:556::/64 dev fy

这条命令为指定的 IPv6 子网 2001:470:1f06:556::/64 添加本地路由。dev fy 指定了处理该子网数据包的网络接口。
命令: sysctl net.ipv6.ip_nonlocal_bind=1

这条命令启用对非本地地址的绑定,允许系统绑定未分配给本地设备的 IPv6 地址。这在需要使用非本地 IPv6 地址的场景中非常有用。
2. 安装并配置 ndppd
ndppd 是一个代理工具,用于响应非本地地址的邻居发现协议 (NDP) 请求,确保指定的 IPv6 地址在局域网中可以被发现和响应。
作者: haowan    时间: 2025-8-19 15:19
AWM 发表于 2025-8-19 15:17
需要IPV6 routed吗?

额 要吧 反正我创建一个单独的yaml配置的。
作者: AWM    时间: 2025-8-19 15:29
haowan 发表于 2025-8-19 15:19
额 要吧 反正我创建一个单独的yaml配置的。

我绿云的机,不是routed
作者: haowan    时间: 2025-8-19 15:32
那去这里白**:https://www.tunnelbroker.net
作者: AWM    时间: 2025-8-19 15:56
haowan 发表于 2025-8-19 15:32
那去这里白**:https://www.tunnelbroker.net

注册不了,什么邮箱都提示邮箱不可用
作者: haowan    时间: 2025-8-19 15:56
AWM 发表于 2025-8-19 15:56
注册不了,什么邮箱都提示邮箱不可用

IP不干净吧。
作者: AWM    时间: 2025-8-19 15:59
haowan 发表于 2025-8-19 15:56
IP不干净吧。

换了几个节点还是一样
作者: AWM    时间: 2025-8-19 20:50
不良林的那个教程可以用,但是协议太旧了用的VMESS,也没有伪装保护,有大佬能改成vless+reality吗?
作者: iyzx    时间: 2025-8-19 20:55
https://github.com/zu1k/http-proxy-ipv6-pool  设置Http 代理,用3xui分流过去就行
作者: AWM    时间: 2025-8-19 21:08
iyzx 发表于 2025-8-19 20:55
https://github.com/zu1k/http-proxy-ipv6-pool  设置Http 代理,用3xui分流过去就行

这个看过了,需要routed,我绿云的鸡,不是routed
作者: 美国VPS综合讨论    时间: 2025-8-19 21:39
AWM 发表于 2025-8-19 15:10
搞的好复杂啊,配置100个IP配置文件不得写死个人啊

又要折腾又嫌复杂,饭都做好了也不吃,咋不说我们研究时候连教程和GPT都没有,自己一点点看出来的
作者: AWM    时间: 2025-8-19 22:16
美国VPS综合讨论 发表于 2025-8-19 21:39
又要折腾又嫌复杂,饭都做好了也不吃,咋不说我们研究时候连教程和GPT都没有,自己一点点看出来的 ...

所以才问有没有一键脚本啊
作者: AWM    时间: 2025-8-20 09:30
DD




欢迎光临 全球主机交流论坛 (https://443502.xyz/) Powered by Discuz! X3.4