Skip to content

v1.2

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Oct 22:07

Notice

This release is now very old. Note that the installation instructions in the current README.md do not apply to this version.

Please use v2.0-rc4, or newer.


Changes since v1.1:

GameGuard patches

  • Added patches for PangYa client US 824. (thanks @luismk)

JSON based configuration system with regular expression based URL rewriting.

Rugburn can now be configured to behave differently using a simple JSON-based configuration scheme.

Here's the example configuration that will be created by default:

{
  "UrlRewrites": {
    "http://[a-zA-Z0-9:.]+/(.*)": "http://localhost:8080/$0"
  },
  "PortRewrites": [
    {
      "FromPort": 10103,
      "ToPort": 10101,
      "ToAddr": "localhost"
    }
  ]
}

UrlRewrites

  ...
  "UrlRewrites": {
    "http://[a-zA-Z0-9:.]+/(.*)": "http://localhost:8080/$0"
  },
  ...
  • Supports rewriting requests made using WinINet via the Rugburn netredir hook.
  • Only a subset of regular expression functionality is supported.
  • Capture groups are supported and can be referenced in the replacement string with $0 - $9.
  • There is no way to reference the entire match. $$ will be substituted with just $ in the result.
  • Only the first match succeeds, going in the order they are specified in the JSON file.
  • You can specify up to 64 URL rewrites.

You can see if your rule matched by checking the gglog.txt file - it will explicitly print what replacement occurred, or explicitly state that no rules matched. Be sure to delete gglog.txt between runs to ensure you are aren't looking at old logs!

The regular expression engine is in src/regex.c - please file an issue if you have any problems. Please attach your gglog.txt with your issue. There are also some regex tests in src/test-main.c - if you are making a contribution to fix an issue with the regular expression parser please make sure these tests pass and if you are really awesome, add a regression test case or two as well to prove your fixes.

PortRewrites

  ...
  "PortRewrites": [
    {
      "FromPort": 10103,
      "ToPort": 10101,
      "ToAddr": "localhost"
    }
  ]
  ...
  • Supports rewriting TCP connections made using WinSock via the Rugburn redir hook.
  • Rewrites every connection to a given port to a specific port on a specific address.
  • In practice, you should only need to rewrite the LoginServer, since all of the other addresses come from that.
  • You can specify a hostname instead of an address. Rugburn will resolve it using GetAddrInfo. However, for the time being it does not support IPv6, pending additional work on the hook to try to provide that support.

JSON parsing

The JSON parser is written from scratch and is in src/json.c. Mind you that it implements the JSON grammar similar to RFC 7159, and does not support some things such as comments or hanging commas. If you encounter any issues with JSON parsing, please file an issue, attach a clean gglog.txt and your configuration.

Miscellaneous

  • Visual Studio project was updated. It is still not tested regularly, please file issues if anything is wrong. In particular, you should not see warnings during the build process. (Make sure you are building for x86 though, as an x64 PangYa client does not exist today, and Rugburn will not function properly in an x64 environment yet; and it will contain warnings in the build.)
  • Fix to strcmp implementation where pointers would advance past the null byte if the first byte is null. Remember, we do not use the standard library :)
  • Minor improvement that will hopefully help the Makefile behave better on some esoteric Windows setups. Building via Makefile is done best on Linux or WSL with OpenWatcom 2 installed to /opt/watcom.

In Closing

That's all folks. Remember to report issues in the bug tracker, and have a good time playing PangYa.