WinMx4u Web Chat

Join WinMX rooms from a phone or computer, or host your own copy with WPN Gateway.

How I built it

I built the browser interface with HTML, CSS and JavaScript so you can use WinMx4u Web Chat on iPhones, Android phones, iPads, other tablets, laptops and desktop computers. The layout adapts to your screen and works in modern browsers such as Safari, Chrome, Edge and Firefox. On a phone or tablet, add WinMx4u Chat to your home screen to open it like an app, without an app-store download. I wrote the downloadable WPN Gateway in Go. The gateway handles WinMX connections on the server and exchanges chat messages with the browser using HTTP requests.

Add Mobile Chat to your home screen

Nothing to download or unzip on your phone or tablet. Open the chat address in your browser and add it to your home screen. The downloads below are for people who want to host their own copy.

Open WinMx4u Mobile Chat

iPhone and iPad

  1. Open Safari and go to rapsmx.com/webchat/.
  2. Tap Share. On some layouts, open the page menu first.
  3. Choose Add to Home Screen. On an iPad you may need to tap View More. If the action is missing, look under Edit Actions.
  4. Turn on Open as Web App if shown, then tap Add.
  5. Return to the home screen and tap WinMx4u Chat.

Apple’s iPhone guide · iPad guide

Android phone or tablet

  1. Open Chrome and go to rapsmx.com/webchat/.
  2. Tap the ⋮ menu next to the address bar.
  3. Choose Add to Home screen or Install and create shortcut, depending on your Chrome version.
  4. Choose Install if offered. Otherwise, choose Create shortcut and confirm Add.
  5. Return to the home screen and tap the new shortcut.

Google’s Chrome guide

WinMx4u Chat
WinMx4u Chat home-screen icon.

If your browser offers a shortcut, tap the shortcut to open the chat. If you do not see an install or shortcut option, bookmark the page. Live chat requires an internet connection.

Portrait chat preview with screen name, room selector, Join room button and chat underneath
Phone layout with an example room selected.
Landscape chat preview with the room controls on the left and chat and Send on the right
Tablet layout in landscape. Narrower screens stack the panels.

Why I updated Web Chat

Web Chat went offline when the temporary gateway address expired. The gateway was still running on my computer, but the website could no longer reach it. I’ve made a hosting kit that lets your gateway connect outward to your website over HTTPS. I’ve also changed Web Chat so a brief gateway error is less likely to drop you out of a room.

There may still be bugs. If you run into one, let me know. Include the time and time zone, your browser and operating system, what you were doing, and any error you saw. Leave out passwords, bridge keys and private messages.

Download Web Chat and WPN Gateway

WPN Gateway connects to WinMX and serves the browser chat. It runs without .NET, PHP, Node.js or Go installed. The static Web Chat download is for operators who want to put the page on a separate web server.

Join from your phone or computer

  1. Open the live Web Chat in your browser.
  2. Enter a screen name with 1–24 letters (A–Z), digits or underscores. Choose a room from the dropdown or use Choose beside a room in the WinMX channel list.
  3. Select Join room, then use Send to chat and Leave to disconnect.

If the gateway is temporarily unavailable, you can choose a room from the most recent saved list and select Join room. Web Chat retries the connection. A room must be reachable through the gateway before you can join or send messages.

Run WPN Gateway on your computer

Windows users

Extract the Windows ZIP to a folder you can write to. Double-click Start WPN Gateway.cmd and open http://127.0.0.1:8080/ on that computer.

Linux users

Choose the archive for your processor, extract it and open a terminal in that folder. Run ./wpn-gateway and open http://127.0.0.1:8080/ on that computer. If your extractor removed the executable permission, run chmod +x wpn-gateway first.

The default address is accessible from the computer running the gateway. Keep the gateway running while you use the chat. Press Ctrl+C in its terminal to stop it.

Put Web Chat on your website

Shared PHP hosting with an outbound HTTPS bridge

Choose the hosting kit when your gateway computer cannot accept incoming connections. You need an HTTPS website, PHP 8.1 or newer with PDO SQLite, and a PHP-writable directory outside the public document root.

  1. Upload the contents of the kit’s webchat folder to your website, for example under /webchat/.
  2. Follow the kit’s README to set up winmx-gateway-private beside your document root. Set bridge-origin.txt to your site’s final HTTPS origin without a trailing slash. Generate a site-specific key and give the server and the bridge private copies as described in the README.
  3. On an always-on Windows or Linux computer, start the gateway and the matching bridge. Point the bridge at your site’s /webchat/gateway-bridge.php. Keep both running. This setup uses outbound HTTPS from the gateway computer.
  4. Open /webchat/gateway-bridge.php on your site and check for ready. Open your chat page from another device, load the channel list and test joining, sending and leaving.

Direct HTTPS gateway

If you can run WPN Gateway and put it behind a public HTTPS reverse proxy, you can use its built-in page at the gateway’s HTTPS URL. To host the page on a separate website, use the static package and follow these steps.

  1. Extract the Web Chat for your website ZIP. Upload the extracted site files together into a folder such as /webchat/ in your website’s document root.
  2. In the uploaded index.html, set the chat-gateway meta tag to your reachable gateway base URL, such as https://chat.example.com/. You can list up to four trusted gateway URLs separated by spaces. Backups can accept new joins. A room session belongs to the gateway that opened it and may need to reconnect after a failure.
  3. Run WPN Gateway on the server or on an always-on Windows or Linux computer. Each gateway operator must allow your website’s exact origin with -site-origin. One reachable gateway can serve several sites.
  4. From another network, open the gateway’s /healthz endpoint and check for ok. This checks that the gateway answers HTTP. Then open your website’s chat page to test the WinMX connection. Test joining, sending a message and loading the channel list.

Windows web servers

Serve the static files from IIS or your existing web server. Run the Windows gateway executable as a separate process under a standard account. For an HTTPS gateway, use a reverse proxy that forwards requests to the gateway’s local port. On IIS, this can be provided by a server administrator with reverse proxy support. If you only have an FTP account, upload the static files and run the gateway on a separate computer.

Linux web servers

Serve the static files from your existing document root. Run the matching Linux gateway executable under an unprivileged account. A service manager such as systemd can keep it running. For HTTPS, use your existing TLS reverse proxy, such as nginx or Apache, to forward to the gateway’s local port.

wpn-gateway.exe -listen 127.0.0.1:8080 -host chat.example.com -site-origin https://example.com
./wpn-gateway -listen 127.0.0.1:8080 -host chat.example.com -site-origin https://example.com

These examples put the gateway behind an HTTPS reverse proxy at chat.example.com. Keep the gateway’s public hostname in the forwarded Host header. For a directly exposed HTTP gateway, choose a reachable listen address and port, such as 0.0.0.0:8080, and set -host to the public hostname and port. The gateway needs outbound TCP access to the WinMX peer caches, Primaries and room servers. Forward its web port only if your direct hosting arrangement requires it.

Gateway settings

HTTP and HTTPS
An HTTP page can use an HTTP or HTTPS gateway. An HTTPS page needs an HTTPS gateway. To allow both site origins, use -site-origin http://example.com,https://example.com. Use HTTPS when available because HTTP traffic is visible in transit.
Preset rooms
Use -rooms rooms.json with a JSON array of entries containing id, name and the full WinMX address. Keep the address’s underscore and 12-character suffix.
Peer cache
Use -peer-cache host:port to change the cache or -peer-cache= to serve preset rooms only.
Saved directory
The gateway saves the last successful lookup in wpn-channels.json. Copy that file next to the hosted page to give new visitors a fallback. Browsers also remember the latest list they receive.

From early web chat to WinMx4u Mobile Chat

Web Chat and the earlier browser tools

Nushi’s early browser chat showed that people could join WinMX rooms from a web page. KingMacro (KM) continued that work with tools such as WPN Lister for finding rooms. WPN Gateway connects to WinMX and exchanges chat messages with the browser using HTTP requests. The page offers preset rooms and the WinMX channel list. Hosts can also run the gateway themselves. Early browser chat guide · KM’s WPN Lister

Mobile Chat and Emulator’s WPCC Mobile

Emulator’s WPCC Mobile showed how a dedicated client could bring WinMX chat to a handheld. WinMx4u Mobile Chat uses the same browser gateway as the WinMx4u web chat, with a layout that adapts to phones and tablets. Open it in Safari or Chrome, then add a home-screen shortcut for quick access. This leaves the WinMX connection with the gateway and makes the same chat page available across devices. WPCC Mobile archive · Mobile setup guide

A massive thank you to WinMX World

I used WinMX World as a reference throughout much of the development of the applications I share here on RapsMX. A massive thank you to everyone who put those guides, technical notes and archives together and kept them available. Without those resources, building these applications would have been much harder. I might never have managed it at all.

I also want to thank Bender and the MXControl contributors for RoboMX and BendMX, KingMacro (KM) for WCS, the developers behind FXServer, Ouka for the Ouka Chat Server, and every developer who built WinMX clients, servers, bots and tools before me. I studied the source code they shared and tested how their applications behaved on the WinMX Peer Network. Both helped me understand how the network works and build the applications I share here.

Thank you to the MXPie and WinMX World teams, the peer-cache operators, room hosts, testers and everyone in the WinMX community who has helped keep the network connected over the years. I appreciate the work that kept WinMX running and kept its knowledge available for people like me to learn from.