Repository navigation
install.sh: --password, --psk, --transport, --pool, --upstream-port, --http-port (#141) - #145
Conversation
…--http-port (#141) Settings made once, as the files they go to: on a rerun a different value is not applied; the installer says which line to edit where. --pool takes a network and prefix (/8 to /30), the server at its first address. --http-port is nginx's port: the listen lines of the server blocks, the start page's links (camex --status --format nginx-index --http-port), the sync service's HTTP_PORT (the links and what --check asks) and the addresses printed. --password, --http-port and --upstream-port need --domain. e2e: every option on a new host, a rerun with others.
Code Review by Qodo
1. Reruns can miss active server overrides
|
PR Summary by QodoAdd installer options for server and nginx configuration
AI Description
Diagram
High-Level Assessment
Files changed (15)
|
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 3f52922 |
… sync service made once, empty values refused, links with a port say http - --psk: below 128 characters, no blank at its ends, hex:/base64: 32 bytes and not all zero (base64 decoded). - A rerun keeps the installed service's HTTP_PORT and UPSTREAM_PORT and says what to edit when the option differs. - --domain/--port/--transport/--psk/--pool/--password/--http-port/ --upstream-port with an empty value are refused. - --transport is compared also when an older unit's arguments were moved. - With --http-port the start page's links are http://<ID>.<domain>:<port>/. - e2e: a TCP client on the second host, its map entry on 8080 and its link on :85; bad psk values; a rerun with another --upstream-port.
3f52922 to
2fde749
Compare
|
/review |
|
Code review by qodo was updated up to the latest commit 2fde749 |
…rintf for the psk and the password - A rerun with another --port keeps port= of camex.conf and says to edit it there. - The transport of camex.service is read as camex reads it: -R tcp, -Rtcp, --transport tcp, --transport=tcp; so are -f, -S, -k and -p with their value attached. - psk= of camex.conf, the printed client command and the start page's password are written with printf: dash's echo reads \c and \n in them. - e2e: a psk and a password with a backslash, -Rtcp in /etc/default/camex and another --port on the rerun.
|
/review |
2fde749 to
32fbe1a
Compare
|
Code review by qodo was updated up to the latest commit 32fbe1a |
…the password, the Windows stub - HTTP_PORT of camex-nginx-sync.service is the first listen port of nginx's file, kept or just made: a file made again with --http-port, or a service made again without it, agree with nginx. - camex-nginx-sync --check escapes \ and " of the password in curl's quoted value. - control_nginx_index()'s Windows stub: http_port unused (-Wextra). - e2e: a quote in the password (--check opens the start page with it); nginx's file made again on --http-port 87; the sync service made again.
32fbe1a to
f79085b
Compare
|
/review |
|
Code review by qodo was updated up to the latest commit f79085b |
…n HTTP listen port, --psk counted in bytes - read_args(): CAMEX_ARGS split as the shell splits it, for the transport check on a rerun and for the summary (--transport tcp is TCP). - nginx's port: the first listen line without ssl or quic, <port>, <address>:<port> or [::]:<port>. - --psk below 128 bytes, as camex counts it (UTF-8 letters are more). - e2e: listen 0.0.0.0:87; --transport with more blanks in CAMEX_ARGS; a psk of 64 two-byte letters refused.
f79085b to
2341c9e
Compare
|
/review |
|
Code review by qodo was updated up to the latest commit 2341c9e |
Closes #141.
Options
--psk <key>psk=in a newcamex.conf(hex:,base64:or a passphrase, checked)hex:key--transport udp|tcp--transport tcpin a new/etc/default/camex; the printed client command has itudp--pool <network>/<prefix>auto_pool=(/8to/30, the network of the given address) andlocal_cidr=, the first address10.200.0.0/24--password <password>(with--domain)--http-port <port>(with--domain)listenlines,HTTP_PORTof the sync service, the addresses printed--upstream-port <port>(with--domain)UPSTREAM_PORTof the sync serviceSettings made once, as the files they go to: on a rerun a different value is not applied, and the installer says which line to edit where (a new password: remove
/etc/camex/nginx-password). The sync service's ports are kept from the installed unit when the option is not given.nginx on another port
The start page's links were
//<ID>.<domain>/: on port 85 they would lead to 80.camex --status --format nginx-index --http-port <port>puts the port in them (none for 80);camex-nginx-syncpassesHTTP_PORT(only when it is not 80, for older camex) and--checkasks nginx on that port.Tests
docker/test-e2e-install.shsection 8, a second host: every option at once (a TCP server on 5900, the pool 10.60.0.0/22 from 10.60.1.7/22, a passphrase psk, a password with a ':' and a blank, nginx on 85, cameras on 8080): camex.conf, the TCP server, the printed command, nginx's listen lines, the service's ports, the page on 85 with the password,--checkon 85; a rerun with other values that changes none of them and says what to edit;--passwordwithout--domainrefused.tests/test_nginxmap.c: the links with:85, none with 80.docker/test-e2e-*.sh, smoke, tun-provider, the kernel module on three images, the Android APK. Windows and macOS: CI.Version 3.12.0.