-
Notifications
You must be signed in to change notification settings - Fork 316
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
Change the danted internal server address binding to IP address #351
Conversation
else | ||
|
||
internals="internal: 0.0.0.0 port = 1080" | ||
fi | ||
for iface in $(ip -o addr | sed -E 's/^[0-9]+: ([^ ]+) .*/\1/' | sort | uniq | grep -v "lo\|sit\|vir"); do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我最近想到一种通过代理访问 lo 的应用,就是进行 web 登录的时候,可以给浏览器设上代理来访问登录页面,这时登录页面访问 localhost 的时候浏览器就可以通过代理来转发给容器里的对应端口,而无须把那个端口从容器开放出来。不知道这里去掉 lo 有没有什么原因?(这只是一个跑题的回复,此处无需在此次 pr 修改)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
唔,从测试看pasta模式下external不需要监听lo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哦我的意思是,如果能通过代理访问容器的 127.0.0.1:54530
或者 127.0.0.1:54631
这样的端口的话(web 登录时供浏览器上的登录网页调用),就不需要专门把它们用 -p
映射了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉这种情形下external也不需要监听lo
…g to IP address
感谢贡献!新版本已经 push 到 dockerhub。 |
Fix #339
danted internal server address not use interface name anymore