Cuong Manh Le
c53a0ca1c4
cmd/cli: close log reader after reading
2025-01-14 14:32:54 +07:00
Cuong Manh Le
a5c776c846
all: change send log to use x-www-form-urlencoded
2025-01-14 14:31:37 +07:00
Cuong Manh Le
5a566c028a
cmd/cli: better error message when log file is empty
...
While at it, also record the size of logs being sent in debug/error
message.
2025-01-14 14:31:24 +07:00
Cuong Manh Le
cd5619a05b
cmd/cli: add internal logging
...
So in case of no logging enabled, useful data could be sent to ControlD
server for further troubleshooting.
2024-12-19 21:50:00 +07:00
Cuong Manh Le
47a90ec2a1
cmd/cli: re-fetch pin code during deactivation checking
...
So if the pin code was updated/removed, it will be checked correctly by
ctrld during stop/uninstall commands.
2024-11-13 15:02:52 +07:00
Cuong Manh Le
c233ad9b1b
cmd/cli: write new config file on reload
2024-08-07 15:51:11 +07:00
Cuong Manh Le
dc48c908b8
cmd/cli: log validate remote config during "ctrld restart"
...
The same manner with what ctrld is doing for "ctrld start" command.
2024-08-07 15:28:00 +07:00
Cuong Manh Le
96085147ff
all: preserve DNS settings when running "ctrld restart"
...
By attempting to reset DNS before starting new ctrld process. This way,
ctrld will read the correct system DNS settings before changing itself.
While at it, some optimizations are made:
- "ctrld start" won't set DNS anymore, since "ctrld run" has already did
this, start command could just query socket control server and emittin
proper message to users.
- The gateway won't be included as nameservers on Windows anymore,
since the GetAdaptersAddresses Windows API always returns the correct
DNS servers of the interfaces.
- The nameservers list that OS resolver is using will be shown during
ctrld startup, making it easier for debugging.
2024-05-24 18:20:30 +07:00
Cuong Manh Le
43d82cf1a7
cmd/cli,internal/router: detect unbound/dnsmasq status correctly on *BSD
...
Also detect cd mode for stop/uninstall command correctly, too.
2024-03-22 16:08:40 +07:00
Cuong Manh Le
dabbf2037b
cmd/cli: do not allow running start command if pin code set
...
While at it, also emitting a better error message when pin code was set
but users do not provide --pin flag.
2024-02-20 15:21:00 +07:00
Cuong Manh Le
d822bf4257
all: add pin protected deactivation
2024-02-07 14:58:38 +07:00
Cuong Manh Le
71f26a6d81
Add prometheus exporter
...
Updates #6
2024-01-22 23:12:17 +07:00
Cuong Manh Le
d01f5c2777
cmd/cli: do not stop listener when reloading
...
We could not do a reload if the listener config changes, so do not turn
them off to try updating new listener config.
2023-11-16 20:56:57 +07:00
Cuong Manh Le
58a00ea24a
all: implement reload command
...
This commit adds reload command to ctrld for re-fetch new config from
ContorlD API or re-read the current config on disk.
2023-11-06 20:01:03 +07:00
Cuong Manh Le
829e93c079
cmd: allow import/running ctrld as library
2023-08-15 18:22:38 +07:00