NETCLICS converts CLI configuration to NETCONF XML / RESTCONF JSON and vice versa. This is performed by round-tripping the configuration through virtual devices, like crpd (containerized JUNOS) or XRd (containerized IOS XR).
By default, NETCLICS listens on HTTP :8080.
To enable HTTPS, start with:
out/bin/netclics --https-port 8443 --tls-cert /path/to/cert.pem --tls-key /path/to/key.pemNotes:
--http-port 0disables HTTP.- HTTPS is enabled only when
--https-port,--tls-cert, and--tls-keyare all provided.
To serve static files under an explicit URL prefix:
out/bin/netclics --static-dir /path/to/public_htmlBy default, NETCLICS serves that directory under /static/.... Use --static-prefix to change the mount point:
out/bin/netclics --static-dir /path/to/public_html --static-prefix /assetsThis is also useful for integrating NETCLICS with certbot. Configure NETCLICS and certbot to use the same web root:
out/bin/netclics --static-dir /path/to/public_html --static-prefix /.well-known
certbot certonly --webroot -w /path/to/public_html ...Certbot will then create files under /path/to/public_html/.well-known/..., and NETCLICS will serve them at /.well-known/....
NETCLICS loads configuration from config/netclics.json by default.
Use a different file with:
out/bin/netclics --config /path/to/netclics.jsonAfter editing the config file, save it and it will be automatically reloaded.