45 Commits

Author SHA1 Message Date
Klemens Nanni
2d587740c1
genkeys, yggdrasilctl: Use pledge(2) on OpenBSD (#1193)
Restrict system operations of CLI tools with
https://man.openbsd.org/pledge.2.

https://pkg.go.dev/suah.dev/protect abstracts the OS specific code, i.e.
is a NOOP on non-OpenBSD systems.

This PR is to gauge upstream interest in this direction; my OpenBSD port
of yggdrasil already pledges the daemon,
resulting in minimal runtime privileges, but there are still a few rough
edges:

https://github.com/jasperla/openbsd-wip/blob/master/net/yggdrasil/patches/patch-cmd_yggdrasil_main_go#L80

---------

Co-authored-by: Neil <git@neilalexander.dev>
2024-12-12 18:48:24 +00:00
Neil Alexander
7790a19e4c
New detail in getMulticastInterfaces admin endpoint 2024-11-23 14:49:48 +00:00
Neil
9398cae230
Expose download/upload rate per peer (#1206) 2024-11-19 08:42:27 +00:00
Klemens Nanni
1ee61dcefa
zap obsolete nonexistent command from usage (#1184) 2024-10-17 13:22:22 +01:00
Neil
c4b29b735c
Link costing based on average RTT (#1171)
This PR updates Ironwood to include the new RTT-based link costing and
updates `yggdrasilctl` to report the cost in `getPeers`.

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2024-09-21 22:05:23 +00:00
Neil
f788a18bef
Measure RTT, report in getPeers (#1143)
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2024-05-30 22:46:06 +01:00
Neil Alexander
81f2c711b4
Fix panic in getPeers on abstract UNIX socket names
Fixes #1111
2024-01-15 23:14:43 +00:00
Neil Alexander
a60771344a
Remove DHT from yggdrasilctl help text (fixes #1069) 2023-10-23 23:42:31 +01:00
Neil Alexander
a233e775eb
yggdrasilctl tweaks 2023-05-19 20:57:14 +01:00
Neil Alexander
7afa23be4c
Link refactoring, admin socket changes 2023-05-19 19:09:05 +01:00
Arceliar
5e95246c26 update to ironwood v0.0.0-20230513191034-495699d87ae4 with API changes 2023-05-13 14:44:38 -05:00
Arceliar
e99c870d51 update admin functions and fix core tests 2023-03-26 16:49:40 -05:00
Neil Alexander
a148f4cfec
More updates for Ygg v0.5 2023-03-19 10:33:07 +00:00
Neil Alexander
4c66a13b93
Version 0.4.6 2022-10-26 18:25:48 +01:00
Neil Alexander
962665189c Tweaks to yggdrasilctl 2022-10-02 13:15:11 +01:00
Neil Alexander
c922eba2d8
Fix sending arguments to the admin socket in yggdrasilctl 2022-09-24 21:28:09 +01:00
Neil Alexander
01c44a087b
Rename tuntap package to tun
We haven't had TAP support in ages.
2022-09-24 14:41:47 +01:00
Neil Alexander
b67c313f44
Admin socket and yggdrasilctl improvements
This refactors the request parsing, as well as improving the output for some request types. It also tweaks `yggdrasilctl` output, which should help with #947.
2022-09-24 12:22:38 +01:00
Neil Alexander
dc9720e580 Extend getSessions admin call to include uptime/TX/RX 2022-09-03 16:55:57 +01:00
Neil Alexander
c6fe81b5d2
Admin socket and yggdrasilctl refactoring (#939) 2022-09-03 10:50:43 +01:00
Neil Alexander
16b8149052 No longer use ioutil which is deprecated 2022-08-06 15:21:21 +01:00
Rubikoid
c19319df5e Fix coords print 2022-05-03 11:40:19 +03:00
Alex Kotov
cbb6dc1b7d
Split yggdrasilctl code into separate functions (refactoring) (#815)
* Move yggdrasilctl responses to separate functions

* Move yggdrasilctl request switch to separate function

* Add empty lines

* Create struct CmdLine for yggdrasilctl

* Move yggdrasilctl command line parsing to separate func

* Turn struct CmdLine into CmdLineEnv

* Rename func parseCmdLine to parseFlagsAndArgs

* Move yggdrasilctl endpoint setting logic into separate func

* Function to create yggdrasilctl CmdLineEnv

* Reorder code

* Move struct fields into lines

* Turn yggdrasilctl CmdLineEnv funcs to methods

* Move yggdrasilctl connection code to separate func

* Rename functions

* Move yggdrasilctl command line env to separate mod

* Move yggdrasilctl command line env to main mod

* Run goimports

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2021-08-02 22:47:38 +01:00
Neil Alexander
d46a883020 Include public key in yggdrasilctl getSelf output for v0.4 nodes 2021-06-05 21:54:05 +01:00
Neil Alexander
ea15eeee7e Ensure PublicKey option is unused, map old config options 2021-06-05 21:32:04 +01:00
Neil Alexander
8932ab0519 Fix lint errors 2021-06-02 14:40:09 +01:00
Ryan Westlund
d6d2d9c19a
Accept some golint suggestions (#690)
* Fixed some linter issues

* Simplified isBetter method

* Accept some linter suggestions

* Fix typo

Co-authored-by: klesomik <klesomiks@gmail.com>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2020-09-27 14:42:46 +01:00
Arceliar
5bd9391c61 slightly cleaner way for yggdrasilctl to os.exit, making sure defers are called 2019-12-25 17:45:24 -06:00
Neil Alexander
02bfe28399
Minor tweaks 2019-08-14 20:09:02 +01:00
Slex
589ad638ea Implement feature from https://github.com/yggdrasil-network/yggdrasil-go/issues/488 2019-08-11 00:31:22 +03:00
Neil Alexander
78eb40cbad
Record session uptime (purely for the admin socket) 2019-05-29 12:59:36 +01:00
Neil Alexander
160e01e84f
Searches called from api.go, various other tweaks, searches now have a callback for success/failure, node ID now reported by admin socket 2019-04-18 23:38:23 +01:00
Neil Alexander
3bc3002fff
Add handlers for setTunnelRouting/getTunnelRouting 2019-03-06 17:37:48 +00:00
Neil Alexander
ad7e392afe
Fix getRoutes (#339) 2019-03-06 17:32:25 +00:00
Neil Alexander
b20c3538b7
Point hjson to master repo following comments merge 2018-12-17 10:50:57 +00:00
Neil Alexander
422424af64
Don't panic 2018-12-17 10:19:20 +00:00
Neil Alexander
83d734e109
Make yggdrasilctl less crashy 2018-12-17 10:17:16 +00:00
Neil Alexander
98a544fd7d
Fix bug in yggdrasilctl where -endpoint gets ignored 2018-12-15 11:48:43 +00:00
Neil Alexander
c78e1b98cc
Show yggdrasilctl log buffer on panic 2018-12-10 11:29:42 +00:00
Neil Alexander
b4b3609678
Really use the correct endpoint 2018-12-10 11:12:40 +00:00
Neil Alexander
d29b5a074a
Try to use default config file location to find AdminListen when yggdrasilctl is not given an endpoint 2018-12-10 11:09:10 +00:00
Neil Alexander
cd11d2eccd
Produce more meaningful logging from yggdrasilctl when things go wrong 2018-12-10 10:54:41 +00:00
Neil Alexander
ba4507c02e
Update yggdrasilctl help (fixes #194) 2018-12-09 13:33:18 +00:00
Neil Alexander
02f98a2592
Only show build name and version if it is known 2018-12-08 11:01:05 +00:00
Arceliar
586781b49c convert to go module 2018-12-07 19:56:04 -06:00