• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Cloudflare WebSocket Tunnel - Free for the Open Tibia community

Some replies are turning this into bedtime stories and random drama instead of focusing on the actual topic of the thread, and half of these stories only God knows if they are even true or not. The goal of this thread was simply to share something useful for the community. Many people are already testing it, improving it and finding it helpful, which is what really matters. If anyone has real feedback, fixes or test results, feel free to share them.

The upgraded version posted here already addresses several of the concerns mentioned regarding websocket handling, reconnects, cleanup and connection stability: Cloudflare WebSocket Tunnel - Free for the Open Tibia community (https://otland.net/threads/cloudflare-websocket-tunnel-free-for-the-open-tibia-community.304390/post-2802165)
 
I’m running some tests connecting through WS, following the “upgraded version” by Aizendazai.

One issue I’m facing is some random disconnections, as shown in the log below:
Bash:
[2026-05-28 18:09:48.929] [WS→TCP Error] [[game] 192.168.45.210: readfrom tcp 127.0.0.1:60214->127.0.0.1:7172: read tcp 104.26.14.87:2053->198.51.100.42:11873: read: connection reset by peer]
[2026-05-28 18:09:48.929] [Bridge] [[game] Closed connection for client: 192.168.45.210]
[2026-05-28 18:13:54.551] [WS→TCP Error] [[game] 192.168.45.210: readfrom tcp 127.0.0.1:48802->127.0.0.1:7172: websocket: close 1006 (abnormal closure): unexpected EOF]
[2026-05-28 18:13:54.551] [Bridge] [[game] Closed connection for client: 192.168.45.210]


I currently have “anti-idle” enabled on 3 clients (using OTCv8-OTA). I suspect some default Cloudflare timeout might be causing the disconnections. I’ll keep monitoring it and will post again as soon as I have more information.

In my test environment, I’m not using HAProxy, since I already have Real IP injection: ENABLED (PROXYv2).

I’m using a single VPS to run everything (OVH).
 
Last edited:
I’m running some tests connecting through WS, following the “upgraded version” by Aizendazai.

One issue I’m facing is some random disconnections, as shown in the log below:
Bash:
[2026-05-28 18:09:48.929] [WS→TCP Error] [[game] 192.168.45.210: readfrom tcp 127.0.0.1:60214->127.0.0.1:7172: read tcp 104.26.14.87:2053->198.51.100.42:11873: read: connection reset by peer]
[2026-05-28 18:09:48.929] [Bridge] [[game] Closed connection for client: 192.168.45.210]
[2026-05-28 18:13:54.551] [WS→TCP Error] [[game] 192.168.45.210: readfrom tcp 127.0.0.1:48802->127.0.0.1:7172: websocket: close 1006 (abnormal closure): unexpected EOF]
[2026-05-28 18:13:54.551] [Bridge] [[game] Closed connection for client: 192.168.45.210]


I currently have “anti-idle” enabled on 3 clients (using OTCv8-OTA). I suspect some default Cloudflare timeout might be causing the disconnections. I’ll keep monitoring it and will post again as soon as I have more information.

In my test environment, I’m not using HAProxy, since I already have Real IP injection: ENABLED (PROXYv2).

I’m using a single VPS to run everything (OVH).
did you make it to work properly without ping spikes?
 
made some changes 100% vibe coded tho ;p but made great changes for me, maybe can be good for you also who knows

New features:
- PROXY v2 support — upgraded the tunnel to send HAProxy PROXY v2 headers with the real player IP, and added parsing
in TFS. IP banning now works correctly through the tunnel instead of always seeing 127.0.0.1
- Session resumption — when Cloudflare rotates edge servers the connection drops. Added a token system: TFS generates
a session token on login and sends it to the client, if the connection drops the client silently reconnects using the
token instead of full re-authentication. Players never notice
- Multi-port fallback — client automatically cycles through ports 8080 → 2052 → 8880 on reconnect failure instead of
just giving up
if any1 need or need codes, im glad to help
 
Last edited:
Back
Top