v2ray / v2ray-core

A platform for building proxies to bypass network restrictions.
https://www.v2ray.com/
MIT License
45.43k stars 8.95k forks source link

docker版本的v2ray,开启动态端口,怎么映射出来呢?有什么好的办法没? #600

Closed John-sone closed 7 years ago

John-sone commented 7 years ago

比如我开启了 50001-50100的动态端口,难道要 -p 50001:50001 ..... -p 50100:50100 这样 手动映射100个端口吗??

daiaji commented 7 years ago

我也很好奇 我开了动态端口难道要在防火墙上开50001-50100 不能UPNP吗?

kehao95 commented 7 years ago

大致了解一点docker,你可以使用--network=host的网络模式,直接让container直接attach到server的网络上,无需特定的端口映射。

John-sone commented 7 years ago

非常感谢 忘记host模式了发自我的iPhone------------------ 原始邮件 ------------------发件人: 柯豪 notifications@github.com发送时间: 2017年10月12日 08:00收件人: v2ray/v2ray-core v2ray-core@noreply.github.com抄送: 高强 hochpeste@gmail.com, Author author@noreply.github.com主题: 回复:[v2ray/v2ray-core] docker版本的v2ray,开启动态端口,怎么映射出来呢?有什么好的办法没? (#600)大致了解一点docker,你可以使用--network=host的网络模式,直接让container直接attach到server的网络上,无需特定的端口映射。

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/v2ray/v2ray-core","title":"v2ray/v2ray-core","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/v2ray/v2ray-core"}},"updates":{"snippets":[{"icon":"PERSON","message":"@kehao95 in #600: 大致了解一点docker,你可以使用--network=host的网络模式,直接让container直接attach到server的网络上,无需特定的端口映射。"}],"action":{"name":"View Issue","url":"https://github.com/v2ray/v2ray-core/issues/600#issuecomment-335981928"}}}

DarienRaymond commented 7 years ago

这个是属于docker的使用问题,和v2ray没有直接关系。