我要感谢 Cling 的开发者们提供了他们的 Java UPNP 库。AutoPortForward 使用了该库。
简介:
AutoPortForward 会自动转发在 server.properties 中指定的端口。网关设备必须支持 UPnP。
插件工作原理:
AutoPortForward 会发现网关设备(例如路由器),并尝试在一个设备上转发指定的端口。当插件禁用时会移除端口转发,启用时则会重新添加。这是通过向网关设备发送 UPnP TCP 请求来实现的,如果设备支持 UPnP,它将接受此请求并转发 server.properties 中指定的端口。此外,它还会显示你的外部 IP 地址。
“但这不可能,你必须要手动端口转发”:
如上所述,这完全可行。详见此处
它会发现网关设备(路由器、网桥、调制解调器)并向其发送 UPnP TCP 请求,将 server.properties 中指定的端口转发到网关设备。
支持的 CraftBukkit / Bukkit 版本:
只要 onEnable 和 onDisable 方法保持一致,AutoPortForward 几乎适用于所有版本的 CraftBukkit 和 Bukkit。
配置:
AutoPortForward 使用 server.properties 中的端口设置(server-port),默认值为 25565。
警告:AutoPortForward 将会移除服务器运行端口上基于 TCP 的端口映射。因此,如果你在同一端口(如 80 端口)上同时运行 Web 服务器和 Minecraft 服务器(尽管你不应该这样做),它将删除 Web 服务器的端口映射并添加 Minecraft 服务器的映射。
I would like to thank the makers of Cling for their java UPNP library. AutoPortForward uses cling
Introduction:
AutoPortForward automaticlly forwards the port that is specified in the server.properties. The gateway device must support UPNP.
How this plugin works:
AutoPortForward discovers gateway devices (ex: routers) and attempts to forward the port specified on a one of the devices. AutoPortForward will remove the port forward on disable, and add it again on enable. This is possible by sending a UPNP TCP request to forward a port to the gateway device, if it has UPNP, it will accept this request and forward the port specified in the server.properties. It also tells you your external ip.
"But that's not possible, you NEED to port forward":
As I stated above, this is very possible. See here
It discovers gateway devices (routers, bridges, modems) and sends a UPNP TCP request to forward the port specified in the server.properties to the gateway device.
What versions of CraftBukkit / Bukkit are supported:
AutoPortForward will work with almost if not all versions of CraftBukkit and Bukkit, as long as the onEnable and onDisable are the same.
Configuration:
AutoPortForward uses the port in the server.properties (server-port) - The default is 25565.
WARNING: AutoPortForward will remove port mappings that use TCP on the port the server will be running off of, so if you have a web server running on port 80, and a minecraft server on port 80 (Which you shouldn't do) it will delete the web server port mapping and add the minecraft server.
评论 0
登录后参与评分
还没有评论,来抢沙发吧