Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS Header for KCP #1672

Merged
merged 3 commits into from
Feb 24, 2023
Merged

DNS Header for KCP #1672

merged 3 commits into from
Feb 24, 2023

Conversation

sduoduo233
Copy link
Contributor

某些校园网在未登录的情况下允许DNS查询,给KCP添加DNS头,把流量伪装成dns请求,可以绕过某些校园网登录。这个和之前的那个pr代码一样,只是这个是在一个新的分支上。

@cross-hello
Copy link
Contributor

cross-hello commented Feb 19, 2023 via email

@Extreme-Icer
Copy link

这个挺感兴趣的,那如果是绕过大陆的情况下还能用么?

@sduoduo233
Copy link
Contributor Author

这个挺感兴趣的,那如果是绕过大陆的情况下还能用么?

GFW应该绕不了,适合在内网用

@Extreme-Icer
Copy link

Extreme-Icer commented Feb 19, 2023

这个挺感兴趣的,那如果是绕过大陆的情况下还能用么?

GFW应该绕不了,适合在内网用

理论上校园网未登录如果可以成功dns查询是可以dns伪装的,那么如果用于proxy和direct不知道好不好使。跟据你所说是绕过校园网登录,不知道能否实现外网和海外都能用。要不然还是有点局限。不过更想知道的是你会不会去设计一个开关去控制开关、是否会与adguard这种冲突等

@sduoduo233
Copy link
Contributor Author

这个挺感兴趣的,那如果是绕过大陆的情况下还能用么?

GFW应该绕不了,适合在内网用

理论上校园网未登录如果可以成功dns查询是可以dns伪装的,那么如果用于proxy和direct不知道好不好使。跟据你所说是绕过校园网登录,不知道能否实现外网和海外都能用。要不然还是有点局限。不过更想知道的是你会不会去设计一个开关去控制开关、是否会与adguard这种冲突等

如果要绕过登录的话所有流量都要走代理,所以建议用内网或国内的的服务器。国外的服务器不确定会不会被GFW墙

@yuhan6665 yuhan6665 merged commit 336b2da into XTLS:main Feb 24, 2023
@yuhan6665
Copy link
Member

感谢!麻烦 @sduoduo233 写一个配置的例子?

@sduoduo233
Copy link
Contributor Author

感谢!麻烦 @sduoduo233 写一个配置的例子?

client:

{
    "log": {
        "loglevel": "debug"
    },
    "inbounds": [
        {
            "port": 10002,
            "protocol": "socks",
            "settings": {
                "udp": true
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "vmess",
            "settings": {
                "vnext": [
                    {
                        "address": "127.0.0.1",
                        "port": 10001,
                        "users": [
                            {
                                "id": "c597db80-96cc-448c-9e50-a7527c159119"
                            }
                        ]
                    }
                ]
            },
            "streamSettings": {
                "network": "kcp",
                "kcpSettings": {
                    "header": {
                        "type": "dns",
                        "domain": "example.com"
                    }
                },
                "mtu": 1000
            }
        }
    ]
}

server:

{
  "log": {
      "loglevel": "debug"
  },
  "inbounds": [
    {
      "port": 10001,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "c597db80-96cc-448c-9e50-a7527c159119"
          }
        ]
      },
      "streamSettings": {
          "network": "kcp",
          "kcpSettings": {
              "header": {
                  "type": "dns",
                  "domain": "example.com"
              }
          },
          "mtu": 1000
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom"
    }
  ]
}

@Extreme-Icer
Copy link

我更想知道是不是只能vmess 还是说支持vless+vision,而且只需要客户端去配置伪装

@sduoduo233
Copy link
Contributor Author

我更想知道是不是只能vmess 还是说支持vless+vision,而且只需要客户端去配置伪

其它支持kcp的协议都支持,不只是vmess

@Extreme-Icer
Copy link

我更想知道是不是只能vmess 还是说支持vless+vision,而且只需要客户端去配置伪

其它支持kcp的协议都支持,不只是vmess

domain里面填的是自己的吧

@sduoduo233
Copy link
Contributor Author

我更想知道是不是只能vmess 还是说支持vless+vision,而且只需要客户端去配置伪

其它支持kcp的协议都支持,不只是vmess

domain里面填的是自己的吧

随便填,不一定是自己的

@kbr3NwSZ6kFq25
Copy link

seed和header同时启用的话header的伪装还有效吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants