Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

[Bug] 域名在路由中不会被解析为ip,导致服务器本地网络可以通过代理访问 #264

Open
KanakoMikami opened this issue Jul 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@KanakoMikami
Copy link

问题描述
尽管可以设置ip规则阻止本地ip,但如果域名解析到本地ip则不会被阻止,导致仍然能连接到本地网络。

复现方法

curl 127-0-0-1.nip.io:8080 -x socks5h://127.0.0.1:1080

预期行为
拒绝连接。

vs版本
自行编译自 d4dba8e

配置文件

[[listen]]
port = 1080
protocol = "socks5"

[[dial]]
protocol = "direct"

[[dial]]
tag = "reject"
protocol = "reject"

[[route]]
ip = ["127.0.0.0/8"]
toTag = "reject"

顺带提一下,这个配置的 reject 设置 extra.type = "nginx" 会 timeout:

DEBUG   reject server got Read error    {"error": "read tcp 127.0.0.1:1080->127.0.0.1:44380: i/o timeout"}
@KanakoMikami KanakoMikami added the bug Something isn't working label Jul 4, 2023
@KanakoMikami KanakoMikami changed the title 域名在路由中不会被解析为ip,导致本地网络服务可以通过代理访问 [Bug] [Bug] 域名在路由中不会被解析为ip,导致本地网络服务可以通过代理访问 Jul 4, 2023
@KanakoMikami KanakoMikami changed the title [Bug] 域名在路由中不会被解析为ip,导致本地网络服务可以通过代理访问 [Bug] 域名在路由中不会被解析为ip,导致服务器本地网络可以通过代理访问 Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant