首页 > 其他分享 >使用sing-box搭建socks5转爱快路由器

使用sing-box搭建socks5转爱快路由器

时间:2024-02-08 18:55:16浏览次数:27  
标签:box bin ip server socks5 tag 转爱快 table type

/etc/sysctl.conf

net.ipv4.ip_forward=1

/etc/sing-box/config.json

{
  "log": {
    "level": "error"
  },
  "inbounds": [
    {
      "tag": "0",
      "type": "tun",
      "interface_name": "tun0",
      "inet4_address": "172.19.0.1/30"
    },
    {
      "tag": "1",
      "type": "tun",
      "interface_name": "tun1",
      "inet4_address": "172.19.0.5/30"
    },
    {
      "tag": "2",
      "type": "tun",
      "interface_name": "tun2",
      "inet4_address": "172.19.0.9/30"
    },
    {
      "tag": "3",
      "type": "tun",
      "interface_name": "tun3",
      "inet4_address": "172.19.0.13/30"
    },
    {
      "tag": "4",
      "type": "tun",
      "interface_name": "tun4",
      "inet4_address": "172.19.0.17/30"
    },
    {
      "tag": "5",
      "type": "tun",
      "interface_name": "tun5",
      "inet4_address": "172.19.0.21/30"
    },
    {
      "tag": "6",
      "type": "tun",
      "interface_name": "tun6",
      "inet4_address": "172.19.0.25/30"
    },
    {
      "tag": "7",
      "type": "tun",
      "interface_name": "tun7",
      "inet4_address": "172.19.0.29/30"
    },
    {
      "tag": "8",
      "type": "tun",
      "interface_name": "tun8",
      "inet4_address": "172.19.0.33/30"
    },
    {
      "tag": "9",
      "type": "tun",
      "interface_name": "tun9",
      "inet4_address": "172.19.0.37/30"
    },
    {
      "tag": "10",
      "type": "tun",
      "interface_name": "tun10",
      "inet4_address": "172.19.0.41/30"
    },
    {
      "tag": "11",
      "type": "tun",
      "interface_name": "tun11",
      "inet4_address": "172.19.0.45/30"
    },
    {
      "tag": "12",
      "type": "tun",
      "interface_name": "tun12",
      "inet4_address": "172.19.0.49/30"
    },
    {
      "tag": "13",
      "type": "tun",
      "interface_name": "tun13",
      "inet4_address": "172.19.0.53/30"
    },
    {
      "tag": "14",
      "type": "tun",
      "interface_name": "tun14",
      "inet4_address": "172.19.0.57/30"
    }
  ],
  "outbounds": [
    {
      "tag": "0",
      "type": "socks",
      "server": "123.123.123.3",
      "server_port": 2000,
      "version": "5",
      "username": "uepvpt",
      "password": "a2coa2"
    },
    {
      "tag": "1",
      "type": "socks",
      "server": "123.123.123.4",
      "server_port": 2001,
      "version": "5",
      "username": "ozohof",
      "password": "qli7wz"
    },
    {
      "tag": "2",
      "type": "socks",
      "server": "123.123.123.5",
      "server_port": 2002,
      "version": "5",
      "username": "skpywm",
      "password": "3hlsqs"
    },
    {
      "tag": "3",
      "type": "socks",
      "server": "123.123.123.6",
      "server_port": 2003,
      "version": "5",
      "username": "jobsms",
      "password": "hmg5gv"
    },
    {
      "tag": "4",
      "type": "socks",
      "server": "123.123.123.7",
      "server_port": 2004,
      "version": "5",
      "username": "yladrt",
      "password": "ayig4g"
    },
    {
      "tag": "5",
      "type": "socks",
      "server": "123.123.123.8",
      "server_port": 2005,
      "version": "5",
      "username": "cyukxl",
      "password": "81oma1"
    },
    {
      "tag": "6",
      "type": "socks",
      "server": "123.123.123.9",
      "server_port": 2006,
      "version": "5",
      "username": "tenahb",
      "password": "hr7mxu"
    },
    {
      "tag": "7",
      "type": "socks",
      "server": "123.123.123.10",
      "server_port": 2007,
      "version": "5",
      "username": "zuqbd",
      "password": "sb4fg"
    },
    {
      "tag": "8",
      "type": "socks",
      "server": "123.123.123.11",
      "server_port": 2008,
      "version": "5",
      "username": "xyown",
      "password": "bu8lw"
    },
    {
      "tag": "9",
      "type": "socks",
      "server": "123.123.123.12",
      "server_port": 2009,
      "version": "5",
      "username": "qlhlv",
      "password": "332jp"
    },
    {
      "tag": "10",
      "type": "socks",
      "server": "123.123.123.227",
      "server_port": 7777,
      "version": "5",
      "username": "test",
      "password": "test"
    },
    {
      "tag": "11",
      "type": "socks",
      "server": "123.123.123.219",
      "server_port": 7777,
      "version": "5",
      "username": "test",
      "password": "test"
    },
    {
      "tag": "12",
      "type": "socks",
      "server": "123.123.123.210",
      "server_port": 7777,
      "version": "5",
      "username": "test",
      "password": "test"
    },
    {
      "tag": "13",
      "type": "socks",
      "server": "123.123.123.213",
      "server_port": 7777,
      "version": "5",
      "username": "test",
      "password": "test"
    },
    {
      "tag": "14",
      "type": "socks",
      "server": "123.123.123.197",
      "server_port": 7777,
      "version": "5",
      "username": "test",
      "password": "test"
    }
  ],
  "route": {
    "rules": [
      {
        "inbound": "0",
        "outbound": "0"
      },
      {
        "inbound": "1",
        "outbound": "1"
      },
      {
        "inbound": "2",
        "outbound": "2"
      },
      {
        "inbound": "3",
        "outbound": "3"
      },
      {
        "inbound": "4",
        "outbound": "4"
      },
      {
        "inbound": "5",
        "outbound": "5"
      },
      {
        "inbound": "6",
        "outbound": "6"
      },
      {
        "inbound": "7",
        "outbound": "7"
      },
      {
        "inbound": "8",
        "outbound": "8"
      },
      {
        "inbound": "9",
        "outbound": "9"
      },
      {
        "inbound": "10",
        "outbound": "10"
      },
      {
        "inbound": "11",
        "outbound": "11"
      },
      {
        "inbound": "12",
        "outbound": "12"
      },
      {
        "inbound": "13",
        "outbound": "13"
      },
      {
        "inbound": "14",
        "outbound": "14"
      }
    ]
  }
}

/bin/ip-rule

#!/bin/sh
ip rule flush
ip rule add table main prio 10
ip rule add from 192.168.0.0/16 table 2 prio 10000
ip rule add from default table default prio 32767

ip rule add from 192.168.1.9 table 1 prio 100
ip rule add from 192.168.1.91 table 101 prio 100

ip rule add from 192.168.1.100 table 100 prio 1000
ip rule add from 192.168.1.101 table 101 prio 1000
ip rule add from 192.168.1.102 table 102 prio 1000
ip rule add from 192.168.1.103 table 103 prio 1000
ip rule add from 192.168.1.104 table 104 prio 1000
ip rule add from 192.168.1.105 table 105 prio 1000
ip rule add from 192.168.1.106 table 106 prio 1000
ip rule add from 192.168.1.107 table 107 prio 1000
ip rule add from 192.168.1.108 table 108 prio 1000
ip rule add from 192.168.1.109 table 109 prio 1000
ip rule add from 192.168.1.110 table 110 prio 1000
ip rule add from 192.168.1.111 table 111 prio 1000
ip rule add from 192.168.1.112 table 112 prio 1000
ip rule add from 192.168.1.113 table 113 prio 1000
ip rule add from 192.168.1.114 table 114 prio 1000
ip rule add from 192.168.1.115 table 100 prio 1000

/bin/ip-route

#!/bin/sh

/bin/ip route replace 1.1.1.1 via 192.168.1.1
/bin/ip route replace 8.8.8.8 via 192.168.1.1

/bin/ip route replace default via 192.168.1.1 table 1
/bin/ip route replace default via 192.168.1.2 table 2
/bin/ip route replace default via 192.168.1.1 table default

/bin/ip route replace default dev tun0 table 100
/bin/ip route replace default dev tun1 table 101
/bin/ip route replace default dev tun2 table 102
/bin/ip route replace default dev tun3 table 103
/bin/ip route replace default dev tun4 table 104
/bin/ip route replace default dev tun5 table 105
/bin/ip route replace default dev tun6 table 106
/bin/ip route replace default dev tun7 table 107
/bin/ip route replace default dev tun8 table 108
/bin/ip route replace default dev tun9 table 109
/bin/ip route replace default dev tun10 table 110
/bin/ip route replace default dev tun11 table 111
/bin/ip route replace default dev tun12 table 112
/bin/ip route replace default dev tun13 table 113
/bin/ip route replace default dev tun14 table 114

/etc/rc.local

#!/bin/sh

/bin/ip-rule

/bin/ip-route
sleep 3
/bin/ip-route
sleep 3
/bin/ip-route
sleep 3
/bin/ip-route

exit 0

标签:box,bin,ip,server,socks5,tag,转爱快,table,type
From: https://www.cnblogs.com/xiangxisheng/p/18012030

相关文章

  • 使用RSS+n8n同步博客园文章到cubox
    使用RSS+n8n同步博客文章到CuboxCuboxCubox是一款碎片知识文章收集的应用n8n低代码的workFlow整合大致流程定时触发器->获取RSS列表->迭代->文章是否已经同步->同步文章到cubox->同步记录写到数据库->结束这是一个大概的流程,当然也可以实现同步到其他地方的流程......
  • RichTextBox控件
    RichTextBox控件用法基本用法基本用法不做赘述富文本用法RTF文档是纯文本文件,可以在不同的软件,和平台之间进行交换和共享,且可以保留文本样式、字体、颜色等格式信息,也可以添加表格。RichTextBox控件中支持RTF格式的文档,可以使流水日志具有各种各样的格式,从而方便查看绘......
  • (13)TreeView1前面带CheckBox显示
     这些节点都是动态生成,再设置。原理还是在前面显示图片实现procedureTForm1.FormCreate(Sender:TObject);varpnode,node:TTreeNode;beginwithTreeView1.Itemsdobeginnode:=Add(nil,'Item1');//动态生成一个节点node.ImageIndex:=......
  • (10)Lazarus下ListBox自画
    参考:VCL下ListBox自画,Lazarus也一样usesLCLType; ListBox的两个设置:自画事件:ListBox1DrawItemprocedureTForm1.ListBox1DrawItem(Control:TWinControl;Index:Integer;ARect:TRect;State:TOwnerDrawState);beginWithListBox1.CanvasDoBeginBrus......
  • 【愚公系列】2024年02月 WPF控件专题 Groupbox控件详解
    ......
  • CheckListbox 勾选操作随笔
    记录代码备用, 增加CheckListbox勾选全选项代码//------------------获取全选项值-----------------------------if(checkedListBox1.SelectedIndex==0){for(inti=1;i<checkedListBox1.Items.Count;i++){ch......
  • Docker Toolbox安装
    一、Dockertoolbox安装下载地址:http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/下载之后,安装下一步,下一步,下一步就行。安装完成之后,启动DockerQuickstart:启动之后,会进行一些初始化设置,这个时候需要一个东西:在Terminal里有一个下载地址,如果继续使用Ter......
  • WPF Prism,mvvm模式下,DataGrid中一列CheckBox的勾选的绑定
    背景WPF+Prism,View和ViewModel,通过Binding来实现数据的更新和界面的刷新,我的需求是做一个表格,第一列为CheckBox,同时这一列的header也是CheckBox,勾选了header的CheckBox,可以实现所有行的CheckBox全选的功能界面如下:实现方法xaml代码:<DataGridx:Name="dgRoundRobin"......
  • 36.solidworks异形孔向导Toolbox文件丢失解决
    1.提示如下问题2.使用Everything_x64搜索电脑上的swbrowser.sldedb文件,得到文件所在位置    3.将文件所在位置 C:\SOLIDWORKSData\lang\english\,去掉后面的内容C:\SOLIDWORKSData,输入下面框内,点击配置,然后确认,注意多试几次4.完成 ......
  • QVBoxLayout添加图片
    QVBoxLayout添加图片 #include<QApplication>#include<QWidget>#include<QVBoxLayout>#include<QLabel>#include<QImage>#include<QPixmap>intmain(intargc,char*argv[]){QApplicationapp(argc,argv);QWid......