@@ -54,33 +54,34 @@ We also offer GUI. visit [ownserver-client-gui](https://github.com/Kumassy/ownse
5454
5555``` sh
5656% ownserver -h
57- ownserver 0.5.1
58-
59- USAGE:
60- ownserver [OPTIONS]
61-
62- FLAGS:
63- -h, --help Prints help information
64- -V, --version Prints version information
65-
66- OPTIONS:
67- --control-port < control-port> Advanced settings [default: 5000]
68- --local-port < local-port> Port of your local game server listens e.g.) 25565 for Minecraft [default:
69- 3000]
70- --payload < payload> tcp or udp [default: tcp]
71- --token-server < token-server> Advanced settings [default: https://auth.ownserver.kumassy.com/v1/request_token]
57+ Expose your local game server to the Internet
58+
59+ Usage: ownserver [OPTIONS] --endpoint < ENDPOINT>
60+
61+ Options:
62+ --endpoint < ENDPOINT>
63+ Port and protocol of your local game server e.g.) ` 25565/tcp` for Minecraft
64+ --api-port < API_PORT>
65+ Advanced settings. You can inspect client' s internal state at localhost:<api_port>.
66+ --control-port <CONTROL_PORT>
67+ Advanced settings [default: 5000]
68+ --token-server <TOKEN_SERVER>
69+ Advanced settings [default: https://auth.ownserver.kumassy.com/v2/request_token]
70+ --periodic-ping-interval <PERIODIC_PING_INTERVAL>
71+ [default: 15]
72+ -h, --help
73+ Print help
74+ -V, --version
7275
7376# listen on local port
7477% nc -kl 3000
7578
76- % ownserver --payload tcp --local-port 3000
77- Connecting to auth server: https://auth.ownserver.kumassy.com/v1/request_token
78- Your proxy server: shard-7924.ownserver.kumassy.com
79- Connecting to proxy server: shard-7924.ownserver.kumassy.com:5000
80- Your Client ID: client_755d0b36-f863-41e1-b5ff-c6c89fdb92a5
81- +---------------------------------------------------------------------------------------------------+
82- | Your server tcp://localhost:3000 is now available at tcp://shard-7924.ownserver.kumassy.com:17974 |
83- +---------------------------------------------------------------------------------------------------+
79+ % ownserver --endpoint 3010/tcp
80+ Your Client ID: client_17638595-be9d-41b9-89bf-c678c1e98d10
81+ Endpoint Info:
82+ +------------------------------------------------------------------------+
83+ | tcp://localhost:3010 <--> tcp://shard-2509.ownserver.kumassy.com:15335 |
84+ +------------------------------------------------------------------------+
8485
8586# you can send any TCP packet to local port!
8687% nc shard-7924.ownserver.kumassy.com 17974
@@ -100,7 +101,7 @@ via cargo
100101java -Xmx1024M -Xms1024M -jar server.jar nogui
101102
102103# run ownserver client
103- ownserver -- --payload tcp --local-port 25565
104+ ownserver -- --endpoint 25565/tcp
104105```
105106
106107share your public URL!
@@ -110,12 +111,12 @@ You can query endpoints and streams info using the client API.
110111You need to specify local port to use the API:
111112
112113```
113- % ownserver --payload tcp --local-port 3000 --api-port 9000
114+ % ownserver --endpoint 25565/ tcp --api-port 9000
114115
115116% curl -s localhost:9000/endpoints
116- [{"id":"client_be38a93b-b7a9-46da-9d9d-51df95cad828 ","local_port":3000,"remote_addr":"shard-5346.ownserver.kumassy.com:13574"} ]
117+ [[ {"id":"02291214-8647-4d08-ace3-032ac255bb14 ","protocol":"TCP","local_port":3010,"remote_port":19083}] ]
117118% curl -s localhost:9000/streams
118- [{"id ":"stream_24a3b5bb-336d-4b4e-baf3-7ef61bc1b78c" }]
119+ [{"stream_id ":"5768354e-97c9-4c6a-8cd2-8163a1f3621c","remote_info":{"remote_peer_addr":"x.x.x.x:13367"} }]
119120```
120121
121122## How it works
0 commit comments