Closed AkramiPro closed 4 weeks ago
sing-box can't magically be aware of your server's public ip especially some servers are behind nat.
sing-box can't magically be aware of your server's public ip especially some servers are behind nat.
i think you can use curl ip.gs
to get the server public ip
you can add this like ip_is_private
so we can use ip_is_server_public
Operating system
Linux
System version
Linux s04 6.8.10-x64v3-xanmod1 #0~20240517.g2e7da9e SMP PREEMPT_DYNAMIC Fri May 17 18:21:06 UTC x86_64 GNU/Linux
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
Description
my server ip is 1.2.3.4 i run socks5 on 1.2.3.4:1080 in my server i use
warp
to handle all requestthe problem is i can not access my server through the socks connection i have a service on port 9595 that want to access i can access https://1.2.3.4:9595 without proxy but not work when use socks5 proxy
the issue is in server config must use direct outbound if request ip is match server public ip address.
i try to use
ip_is_private
in routing rules but i think it just not works for detect server public ip.i know that i can do it manually by set my server public ip in routing rules but i have many servers and the server ip may change and i was hoping that maybe you can add option to detect if the request ip is match server public ip so we can route this requests to direct outbound automatically.
Reproduction
Logs
No response
Supporter
Integrity requirements