diff --git a/README.md b/README.md index 15bd808..c34bf1b 100644 --- a/README.md +++ b/README.md @@ -45,20 +45,23 @@ When making any kind of changes to the code, always start off by running both th - Update `config-instance.toml` to match the following ``` -const instanceConfig = { - hostip: { - endpoint: "ws://localhost:8080" - }, - runtime: { - debug: true, - enableLogging: true - } -} +### +# Config for the web and websockets servers +# The password is for any routes you want to password protect +# By default this is only the endpoint that lists active connections for debugging purposes +### +[server] +httpPort = 80 +websocketPort = 81 +domain = 'foo.com' +password = 'changeme' -export default instanceConfig +[runtime] +debug = true +enableLogging = false ``` -Once this is done compile the client with `npm run build` and then invoke the client with `node dist/src/index.js `. +Once this is done compile the client with `npm run build` and then invoke the client with `node dist/srv/index.js `. You'll see output like: ``` @@ -76,9 +79,9 @@ Replace the domain with the domain shown in your `tunnelmole-client` output. On Linux and Mac, your hosts file is located at `/etc/hosts`. On Windows, its located at `C:\Windows\System32\Drivers\etc\hosts`. -If you want custom domains or other "premium" features, add an API key to `src/authentication/apiKeys.json` in `tunnelmole-service`. You can then run `node dist/src/index.js --set-api-key `. All custom subdomains need to be added to your hosts file if you are running `tunnelmole-service` locally. +If you want custom domains or other "premium" features, add an API key to `src/authentication/apiKeys.json` in `tunnelmole-service`. You can then run `node dist/srv/index.js --set-api-key `. All custom subdomains need to be added to your hosts file if you are running `tunnelmole-service` locally. -Then run for example `node dist/src/index.js as mydomain.localhost` to get a custom subdomain. Add your chosen domain to your hosts file so your computer can resolve it. +Then run for example `node dist/srv/index.js as mydomain.localhost` to get a custom subdomain. Add your chosen domain to your hosts file so your computer can resolve it. Then start a web server listening on your chosen port and hit the `http` URL `tunnelmole-client` gave you you earlier in your browser or other HTTP client and it will work if you've set everything up correctly. @@ -99,15 +102,15 @@ Once this is done, update `config-instance.ts` in `tunnelmole-client` to point t ``` const instanceConfig = { hostip: { - endpoint: "wss://foo.com:81" + endpoint: "ws://foo.com:8080" }, runtime: { - debug: false, + debug: true, enableLogging: true } } -export default instanceConfig; +export default instanceConfig ``` At that point, rebuild and run the client like below: @@ -174,4 +177,3 @@ Thats the only difference between the code here and whats running on Tunnelmole. ### Official Website The official website for this project is at [https://tunnelmole.com](https://tunnelmole.com). Don't get Tunnelmole from anywhere else other than this website or the official GitHub repositories! -