游戏服务器的 Apache mod_proxy 端口重定向?
我有一个游戏在端口 xxxx(即服务器)上运行。我在 Apache 中为 mod 代理制定了一条规则,将该端口转发到 25555 /game (理论上应该可以工作。连接时出现问题,因为我被引导相信标头不正确或基本上 Apache mod 代理仅适用于 http 或 目的地并通过代理反向返回
它不会
?
将所有数据包直接转发到 模块/mod_proxy.so LoadModule proxy_ajp_module 模块/mod_proxy_ajp.so LoadModule proxy_balancer_module 模块/mod_proxy_balancer.so LoadModule proxy_connect_module 模块/mod_proxy_connect.so LoadModule proxy_ftp_module 模块/mod_proxy_ftp.so LoadModule proxy_http_module module/mod_proxy_http.so
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /folder/ http://localhost:8180/folder
ProxyPassReverse /folder/ http://localhost:8180/folder
I've got a game running on port xxxx (server, that is). I made a rule for mod proxy in Apache to forward that port to 25555 /game (which theoretically should work. Problem comes when conencting, since I'm led to believe that the Headers are incorrect or basically Apache mod proxy only works with http or ftp traffic. It doesn't forward all packets directly to the destination and back with proxy reverse? For websites on other ports it works, just not anything non-http or ftp.
Example config:
(only summarizing)
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /folder/ http://localhost:8180/folder
ProxyPassReverse /folder/ http://localhost:8180/folder
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,代理适用于特定类型的流量。 HTTP、FTP、AJP 等。就其本质而言,代理服务器需要了解其处理的流量的性质。 Proxy/Apache 不是用于任何连接/流量的端口转发的正确工具。您需要一些其他较低级别的网络实用程序来进行通用预警。
如果你使用的是 Linux,我认为你可以使用 iptables 或其他东西来实现这一点。也许去询问服务器故障,因为通用转发在那里更适合。
Yep, proxying is for specific types of traffic. HTTP, FTP, AJP, etc. By its nature a proxy server needs to know the nature of the traffic its dealing with. Proxy/Apache is not the correct tool to use for port forwarding of any connections/traffic. You need some other lower level network utility for generic forwarning.
If you're on linux I think you can use iptables or something for this. Maybe go and ask on Server Fault, as generic forwarding is more suited over there.