How to see the requests to an https link from the command line
Open the link together with its inspector, a page in this computer's browser that shows every request to the link and your service's answer, and lets you send any request again:
proximamp http 3000 --inspect
On a server without a browser, open the page on your own computer through ssh, or watch the requests as lines in the terminal.
Open the inspector
proximamp http 3000 --inspect # the link and its inspector at once; the same for proximamp https 8443 --inspect
proximamp inspect # the inspector of a link another command of this computer already holds
proximamp inspect t2 # with several links: the number from proximamp ls or the address
proximamp inspect --no-browser # only print the page's address
The inspector works while the command runs. The command prints the page's address, http://127.0.0.1:<port>/#code=…, and opens it in the browser. The address works once and within a minute. For another tab or browser, press Enter in the command's window: it prints a new address.
The page opens only on this computer. In WSL the program answers "The inspector cannot run here: this system does not show which user a connection to 127.0.0.1 comes from (WSL is not supported)".
Since app version 1.4.0
The screen is the same as in ProximaClient: what the log shows and what you can do with a request is on the page "Inspector". The differences: proximamp has no network slowdown, and on the free plan a paid action shows a hint with the command proximamp plans instead of the plans screen.
On a server without a screen
If the server can't open a browser, the command prints an ssh line. Run it on your own computer and open the page's address there:
ssh -o ExitOnForwardFailure=yes -L <port>:127.0.0.1:<port> <user>@<server>
Without --port the page takes a free port, which changes from run to run. To keep the ssh line the same, open the link without --inspect and start the inspector on a port of your own:
proximamp inspect --port 4040
A port forwarded with ssh -L is open to every user of your computer: do this only on your own.
If even that can't reach the page, for example when the server has only the hosting provider's web console, watch the requests as lines. At a terminal the link's own command prints them, under the address:
proximamp http 3000
Each request appears as a line when it ends:
#12 14:03:21 POST /api/orders → 200 12 ms 1.2 KB
In the same window, a request's number prints the request and the answer in full, replay <number> sends the request to the service again, curl <number> prints it as a curl command for bash, and quit closes the link, as Ctrl+C does. Passwords, tokens and cookies are printed as [masked]: only the page in the browser can show them. In a script, under nohup, in Docker without -it and with the output going to a file, there are no request lines. A command started in the background prints the lines but takes no commands. In both cases a separate command in another window shows the requests and takes the commands. It starts with the last 20 requests, and quit there only exits:
proximamp inspect --text
In Docker the inspector page stays inside the container, so watch the requests as lines:
docker compose exec proximamp proximamp inspect --text # Docker Compose
docker exec -it proximamp proximamp inspect --text # docker run
The requests to a link of the service are shown by a command with the same --port, --text and ssh line (on Windows without sudo, in an administrator terminal):
sudo proximamp service inspect
On Linux the service's --port starts at 1024. If sudo answers command not found (why), type:
sudo env "PATH=$PATH" proximamp service inspect
Check
Open the https://… link from the command's first line in your phone's browser: the request appears in the inspector and as a line in the command's window, with your service's answer code.