CLI
menfez http
Section titled “menfez http”Opens an HTTP tunnel to a local port. WebSockets on the same port work too.
menfez http <ADDR> [--subdomain <NAME>] [--host-header <VALUE>]ADDR can be:
| Form | Connects to |
|---|---|
3000 |
localhost:3000 |
127.0.0.1:8080 |
that address |
http://localhost:5173 |
localhost:5173 |
myhost |
myhost:80 |
Local services must speak plain HTTP; HTTPS on the local side is not supported yet.
| Flag | |
|---|---|
--subdomain <NAME> |
Ask for NAME.menfez.cloud instead of a random name. See rules. |
--host-header rewrite |
Send the local address (localhost:3000) as Host. |
--host-header <VALUE> |
Send VALUE as Host. |
menfez start
Section titled “menfez start”Opens the tunnels defined in the config file: all of them, or the ones named.
menfez start # every tunnelmenfez start web api # only thesemenfez login
Section titled “menfez login”Saves a token to the config file (created with permissions 0600 on Unix).
menfez login <TOKEN>menfez config
Section titled “menfez config”Prints the path of the config file.
Global options
Section titled “Global options”| Flag | Environment | |
|---|---|---|
--token <TOKEN> |
MENFEZ_TOKEN |
Token, instead of the one in the config file |
--server <URL> |
MENFEZ_SERVER |
Connect endpoint (default wss://connect.menfez.dev/v1) |
--config <PATH> |
MENFEZ_CONFIG |
Config file location |
-v, --verbose |
MENFEZ_LOG |
Debug logs; MENFEZ_LOG takes a filter such as debug |
Flags win over environment variables, which win over the config file.
Exit behavior
Section titled “Exit behavior”menfez keeps reconnecting until you stop it. It exits with status 1 when retrying cannot help:
the token is rejected (unauthorized), the client is too old
(unsupported_version), or none of the tunnels could be
opened on the first attempt (for example subdomain_taken).