Neil Alexander
16b8149052
No longer use ioutil
which is deprecated
2022-08-06 15:21:21 +01:00
Neil Alexander
5616b9fc84
Don't lose my work
2022-07-24 10:23:25 +01:00
Rubikoid
c19319df5e
Fix coords print
2022-05-03 11:40:19 +03:00
Paul Dee
1c7deb72db
Align struct elements to byte boundaries: reduce memory footprint. ( #834 )
2021-09-21 21:19:40 +01: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
Arceliar
f990a56046
have the core wrap and export the underlying PacketConn, move IPv6 ReadWriteCloser wrapper logic to a separate package
2021-07-05 13:14:12 -05:00
Arceliar
5844079f67
make sure genconf exits, clean up some commented out code
2021-07-03 17:27:00 -05:00
Arceliar
df44b0227b
disable SIGHUP handling for now
2021-07-01 08:54:14 -05:00
Arceliar
ff44417dec
listen for SIGHUP, restart node (reload config file, listen for stdin again, etc) if we receive one
2021-07-01 08:04:01 -05:00
Arceliar
de853fed10
multicast configuration changes
2021-06-27 17:24:46 -05:00
Neil Alexander
4701f941a9
Remove debug line
2021-06-27 09:42:46 +01:00
Arceliar
a42b77db84
attempt to convert old multicast listen regexps into new struct format
2021-06-27 03:33:29 -05:00
Arceliar
2a7a53b6b6
move GenerateConfig to defaults, to adjust dependency ordering, needed for stuff later
2021-06-27 02:18:51 -05:00
Arceliar
e7da3d72c4
remove session firewall, this can't prevent memory use so it's better to just use OS native tools
2021-06-06 02:35:02 -05: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
80b6bf0c78
Further tweaks to transition handling
2021-06-05 21:49:11 +01:00
Neil Alexander
54cced0b89
Ensure PublicKey is correct when extracting from old config
2021-06-05 21:40:58 +01:00
Neil Alexander
ea15eeee7e
Ensure PublicKey option is unused, map old config options
2021-06-05 21:32:04 +01:00
Neil Alexander
99973b2757
Remove module package, it didn't really give us anything anyway
2021-06-05 20:57:03 +01:00
Arceliar
e67ee9232d
fix nil pointer when attempting to access node config
2021-06-05 06:00:33 -05:00
Neil Alexander
8932ab0519
Fix lint errors
2021-06-02 14:40:09 +01:00
Neil Alexander
166336a418
Remove config.NodeState (hot reconfig is no longer supported)
2021-06-02 14:19:32 +01:00
Arceliar
6bc2044ced
update ironwood dependency, fix ansible code, go mod tidy
2021-05-23 17:52:10 -05:00
Arceliar
018f35d9a2
rename src/yggdrasil to src/core
2021-05-23 14:42:26 -05:00
Arceliar
0343dad934
remove obsolete crypto package
2021-05-23 14:33:28 -05:00
Arceliar
5b00273dfc
move sessionfirewall into the tuntap. this needs testing. the name is also slightly wrong, since a crypto session can still be set up, packets are just accepted/rejected at the tun/tap level instead
2021-05-15 15:55:47 -05:00
Neil Alexander
815f2a2822
Respond with ICMPv6 Packet Too Big over network
2021-05-10 23:09:59 +01:00
Neil Alexander
57ea61b338
Remove reconfiguration on SIGHUP - it didn't work reliably anyway
2021-05-10 22:47:28 +01:00
Neil Alexander
05caf36f4e
Fix AllowedPublicKeys
2021-05-10 22:39:12 +01:00
Neil Alexander
bb92e61e68
Remove encryption public key options (they are now derived from ed25519 key conversion in IW), also bump link version number
2021-05-10 22:06:38 +01:00
Arceliar
6cb958e3dc
update genkeys to new address format
2021-05-10 05:58:06 -05:00
Arceliar
8bed79370b
(broken state) WIP, compiles and passes the netns ping test
2021-05-08 11:52:22 -05:00
Arceliar
ace7b43b6d
(broken state) WIP address migration
2021-05-08 07:25:53 -05:00
Neil Alexander
fdb296047b
Merge branch 'future' into develop-future
2020-09-27 20:28:26 +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
20ef591013
fix some crashes with races during peer setup
2020-05-02 11:16:11 -05:00
Arceliar
72afa05029
test dial/listen in the sim
2020-05-02 10:01:09 -05:00
Arceliar
5db93be4df
more sim work
2020-04-26 09:59:30 -05:00
Arceliar
9c818c6278
work-in-progress on a new sim
2020-04-26 07:33:03 -05:00
Neil Alexander
8c12fc4fdb
Merge branch 'develop' into misc
2020-01-05 23:04:51 +00:00
Arceliar
5bd9391c61
slightly cleaner way for yggdrasilctl to os.exit, making sure defers are called
2019-12-25 17:45:24 -06:00
Anatolii Kurotych
468e366168
Use loglevel instead comma-separated list of logging
2019-12-01 11:27:20 +02:00
Dimitris Apostolou
73f50af3b7
Fix typos
2019-11-29 11:45:02 +02:00
Neil Alexander
16a487cb1d
Move genkeys into cmd/ as this allows 'go run github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys'
2019-11-19 14:34:10 +00:00
Neil Alexander
e310a25e59
Use crypto.GetNodeID instead of sha512 directly
2019-11-11 09:40:25 +00:00
Neil Alexander
e3a5e4f3b7
Add -address and -subnet flag for getting address/subnet out of config
2019-11-10 19:38:35 +00:00
Neil Alexander
a072e063d8
Define module.Module interface, update admin/tuntap/multicast modules to comply with it, fix #581
2019-10-23 10:44:58 +01:00
Neil Alexander
39461cb603
Don't os.Exit
2019-09-19 09:56:27 +01:00
Neil Alexander
00a972b74e
Disconnect peers when stopping, stop modules before core
2019-09-18 15:22:17 +01:00
Neil Alexander
fc9a1c6c31
Simplify reconfiguration
2019-08-28 19:31:04 +01:00
Neil Alexander
2a629880fd
Rename crypto-key config options, improve control flow
2019-08-19 10:28:30 +01: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
bbb35d7209
Transform Listen statement to new format if needed
2019-08-07 10:52:19 +01:00
Neil Alexander
4804ce39af
Tidy up the terminate path a bit
2019-07-06 12:17:40 +01:00
Neil Alexander
02c99d3e7d
More directly define a minwinsvc exit handler
2019-07-06 12:04:31 +01:00
Neil Alexander
12486b0557
Try to more gracefully handle shutdowns on Windows
2019-07-06 11:52:30 +01:00
Neil Alexander
23108e268b
Use go-syslog to fix builds on Windows
2019-06-29 00:32:23 +01:00
Neil Alexander
93a323c62c
Add support for logging to file or syslog instead of stdout
2019-06-28 23:45:04 +01:00
Neil Alexander
907986f200
Implement session firewall as gatekeeper func in cmd/yggdrasil
2019-06-11 12:50:01 +01:00
Neil Alexander
78eb40cbad
Record session uptime (purely for the admin socket)
2019-05-29 12:59:36 +01:00
Neil Alexander
d575b83ec1
Refactor admin socket somewhat, allow modules to set up their own handlers
2019-05-19 22:02:04 +01:00
Neil Alexander
8ef1978cb1
Start factoring out the admin socket into a separate module (not all functions implemented yet)
2019-05-19 17:27:48 +01:00
Neil Alexander
2df62e2b9b
Remove code that translates v0.2 config options (it was commented out anyway)
2019-05-17 22:52:14 +01:00
Neil Alexander
ae2cc13d14
Fix configuration reloading support
2019-05-17 22:29:52 +01:00
Neil Alexander
781cd7571f
Fix race on tun conns, but still deadlocks if more than one connection is opened
2019-04-21 12:00:31 +01:00
Neil Alexander
d01662c1fb
Try to convert TUN/TAP to use new yggdrasil.Conn, search masks are still broken
2019-04-20 16:32:27 +01:00
Neil Alexander
24281d4049
Fix Read, update sample
2019-04-19 23:47:11 +01:00
Neil Alexander
693bcc5713
Update sample in cmd/yggdrasil
2019-04-19 23:30:57 +01:00
Neil Alexander
ade684beff
Signal when a session is closed, other tweaks
2019-04-19 10:55:15 +01:00
Neil Alexander
b2f4f2e1b6
Update errors, update Write
2019-04-19 00:07:26 +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
4c0c3a23cb
Fix bugs
2019-03-29 18:24:57 +00:00
Neil Alexander
a830521078
Don't crash if Yggdrasil is started with no router adapter
2019-03-29 08:38:09 +00:00
Neil Alexander
dd05a7f2a8
Tweaks
2019-03-28 19:09:19 +00:00
Neil Alexander
7ea4e9575e
Break out multicast into a separate package
2019-03-28 16:13:14 +00:00
Neil Alexander
0b494a8255
Refactoring: move tuntap and icmpv6 into separate package
2019-03-28 00:30:25 +00:00
Neil Alexander
41872820c3
Remove isAutoconf option to GenerateConfig
2019-03-12 19:18:43 +00:00
Arceliar
a0e6edd219
Merge pull request #360 from neilalexander/multilink
...
Support for multiple listeners
2019-03-08 18:56:47 -06: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
be8db0c120
Support multiple TCP listeners
2019-03-04 17:52:57 +00:00
Neil Alexander
0ca64b0abe
Remove ReadTimeout configuration option
2019-02-10 12:13:49 +00:00
Neil Alexander
0838928668
Add support for flexible logging levels
2019-01-27 13:31:43 +00:00
Neil Alexander
fdf300a1ff
Handle AllowedEncryptionPublicKeys internally
2019-01-16 20:26:39 +00:00
Neil Alexander
f6b663c257
Make multicasting use config instead of ifceExpr in Core
2019-01-14 19:27:13 +00:00
Neil Alexander
87d393bd9f
Move add peer loop into Core, refresh it from active config
2019-01-14 17:21:15 +00:00
Neil Alexander
738a9da796
Merge branch 'develop' into nodeconfig
2019-01-14 14:01:38 +00:00
Neil Alexander
53aeca8fa2
Add some simple functions for Swift bindings (iOS)
2019-01-01 23:25:20 +00:00
Neil Alexander
f96747181d
Allow updating AdminListen during runtime
2018-12-30 12:26:55 +00:00
Neil Alexander
219fb96553
Support notifying components for config reload, listen for SIGHUP
2018-12-29 18:51:51 +00:00
Neil Alexander
586deed0f9
Add NodeInfoPrivacy option for not including defaults, and also check for null/"null" instead of "hide"
2018-12-21 09:56:34 +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
a50964b334
Fix panic if Peers or InterfacePeers is commented out
2018-12-15 11:57:25 +00:00
Neil Alexander
98a544fd7d
Fix bug in yggdrasilctl where -endpoint gets ignored
2018-12-15 11:48:43 +00:00
Neil Alexander
1a7df477b0
Also correct tcp: into tcp://
2018-12-14 17:55:07 +00:00
Neil Alexander
ccf6ce07a4
Fix Peers and InterfacePeers when not in correct format
2018-12-14 17:49:42 +00:00
Neil Alexander
c78e1b98cc
Show yggdrasilctl log buffer on panic
2018-12-10 11:29:42 +00:00