Skip to content

Proxy

knot proxy manages reusable HTTP and SOCKS5 proxies. Server profiles reference proxies with --proxy, so proxy addresses and credentials do not need to be repeated on every server.

Commands

sh
knot proxy [command]
CommandDescription
knot proxy listList configured proxies. Alias: knot proxy ls.
knot proxy addAdd or overwrite a managed proxy.
knot proxy editEdit a proxy interactively.
knot proxy removeRemove a proxy. Alias: knot proxy rm.

Add a Proxy

sh
knot proxy add [alias] [flags]
FlagTypeDefaultDescription
--typestringemptyProxy type: socks5 or http.
--hoststringemptyProxy host.
--portint0Proxy port.
--userstringemptyProxy username.
--passwordstringemptyProxy password.

When --type, --host, and --port are provided, the command runs non-interactively:

sh
knot proxy add corp --type socks5 --host 127.0.0.1 --port 1080

Reference a Proxy from a Server

sh
knot add app --host 10.0.1.20 --user deploy --proxy corp
knot edit app --proxy corp

To clear a server proxy, pass an explicitly changed empty value with knot edit.

Remove a Proxy

sh
knot proxy remove corp
knot proxy rm corp

If servers reference the proxy, Knot asks before clearing those references.