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

connection to private IP or self ignored service=https #74

Closed
yaser-k opened this issue Sep 9, 2023 · 3 comments
Closed

connection to private IP or self ignored service=https #74

yaser-k opened this issue Sep 9, 2023 · 3 comments

Comments

@yaser-k
Copy link

yaser-k commented Sep 9, 2023

why is connection to private IP ignored? I want to implement sniproxy in a lan and therefore the IP that sniproxy returns to clients is a private range.

@mosajjal
Copy link
Owner

in

if rAddr.IsLoopback() || rAddr.IsPrivate() || rAddr.Equal(net.IPv4(0, 0, 0, 0)) || rAddr.Equal(net.IP(c.PublicIPv4)) || rAddr.Equal(net.IP(c.sourceAddr)) || rAddr.Equal(net.IP(c.PublicIPv6)) {
, any connection to RFC1918 addresses are blocked. This is mainly implemented to prevent rebinding attacks or SSRF against the VPS infrastructure on the open internet. I can consider an option switch to allow local IPs for sniproxy but it'll be off by default.

@yaser-k
Copy link
Author

yaser-k commented Sep 10, 2023 via email

@mosajjal
Copy link
Owner

#80

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

No branches or pull requests

2 participants