Skip to content

network/config related fix, and a GM menu command#18

Open
cs8425 wants to merge 9 commits into
MikuLeaks:mainfrom
cs8425:dev
Open

network/config related fix, and a GM menu command#18
cs8425 wants to merge 9 commits into
MikuLeaks:mainfrom
cs8425:dev

Conversation

@cs8425
Copy link
Copy Markdown
Contributor

@cs8425 cs8425 commented Apr 30, 2026

changes:

  • command for switching GM menu, use it via client's chat
  • fix for wrong binding address and public address, which cause server must always run on same machine
  • temporary fix for: auto try another proxy port if port conflict
  • update docs, no longer need to setup cert

about binding and address:
for default config:

  • before:
    • ProxyServer:
      • bind = 127.0.0.1:8888
      • sdk address = 127.0.0.1:21500 (proxy target, use inside proxy)
    • SdkServer:
      • bind = 127.0.0.1:21500 (config is 0.0.0.0:21500, not match)
      • public address = 127.0.0.1:21500
    • GameServer:
      • bind = 0.0.0.0:21000
      • public address = 127.0.0.1:21000 (info send to client)
  • after:
    • ProxyServer:
      • bind = 127.0.0.1:8888
      • sdk address = 127.0.0.1:21500 (proxy target, use inside proxy)
        • control via Proxy.ServerHttpAddress Proxy.ServerHttpPort
    • SdkServer:
      • bind = 127.0.0.1:21500 (config = 127.0.0.1:21500, match config)
      • public address = 127.0.0.1:21500
    • GameServer:
      • bind = 127.0.0.1:21000
      • public address = 127.0.0.1:21000 (info send to client)

for config bind = 0.0.0.0, public address = 192.168.x.x:

  • before:
    • ProxyServer:
      • bind = 127.0.0.1:8888 <<< this cause not work
      • sdk address = 127.0.0.1:21500 (proxy target, use inside proxy)
    • ProxyServer (modify proxy code and compile with correct value):
      • ListenAddress = 0.0.0.0
      • ServerHost = 127.0.0.1
      • bind = 0.0.0.0:8888
      • sdk address = 127.0.0.1:21500 (proxy target, use inside proxy)
    • SdkServer:
      • bind = 192.168.x.x:21500 (config is 0.0.0.0:21500, not match)
        • may not work if there is a NAT between client and server
      • public address = 192.168.x.x:21500
    • GameServer:
      • bind = 0.0.0.0:21000
      • public address = 192.168.x.x:21000 (info send to client)
  • after:
    • ProxyServer:
      • bind = 0.0.0.0:8888
      • sdk address = 127.0.0.1:21500 (proxy target, use inside proxy)
        • control via Proxy.ServerHttpAddress Proxy.ServerHttpPort
    • SdkServer:
      • bind = 0.0.0.0:21500 (config = 0.0.0.0:21500, match config)
      • public address = 192.168.x.x:21500
    • GameServer:
      • bind = 0.0.0.0:21000
      • public address = 192.168.x.x:21000 (info send to client)

I'm working on refactoring the startup flow,
because the proxy port may change if conflict (sdk server and game server may need this too).
And there's a way we don't have to change system proxy nor install ca cert,
get rid of the issue which user already have another system proxy but our proxy won't use it.
Just need to set up a environment variable in steam launch options.
If also want the proxy port automatically update when port conflict,
then refactoring the startup flow will be very critical.
The local server needs:
bind all the port first, retry if conflict,
and setup environment variable dynamically,
and then finally launch the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant