Neil Alexander
2eda59d9e4
Improve link setup locking and guards
2023-05-23 22:39:10 +01:00
Neil Alexander
06ca8941c7
Fix race condition between incoming and outgoing connection setup
2023-05-22 23:10:44 +01:00
Arceliar
e94985c583
try to cheer up the linter again
2023-05-21 12:49:49 -05:00
Arceliar
5a6f27e732
cheer up the linter
2023-05-21 12:43:03 -05:00
Arceliar
8b5add5301
reduce allocations (also pulls in updated ironwood to do the same)
2023-05-21 12:38:16 -05:00
Neil Alexander
cb8333f9ff
Tweak lock behaviour
2023-05-21 00:02:04 +01:00
Neil Alexander
333561f4e1
Tweak link state locking, add comments, listener priority, other fixes
2023-05-20 23:44:31 +01:00
Neil Alexander
aff3201084
Fix incoming connection handlers
2023-05-20 22:22:15 +01:00
Neil Alexander
c0188f5600
Discriminate multicast peers more loosely
2023-05-20 21:18:49 +01:00
Neil Alexander
e0b39b303f
Use regular mutex instead (less type assertions)
...
This reverts commit 5ba9dadc490a5880c68db2519a8bc768c6ee002b.
2023-05-20 18:36:44 +01:00
Neil Alexander
5ba9dadc49
Use sync.Map
instead of link actor
2023-05-20 18:31:01 +01:00
Neil Alexander
6e338b6f89
Fix con urrent map accesses
2023-05-20 18:21:02 +01:00
Neil Alexander
7b1635245f
Add missing path notify and bloom transform
2023-05-19 19:33:40 +01:00
Neil Alexander
a9ec3877b5
Fix unit test
2023-05-19 19:09:06 +01:00
Neil Alexander
7afa23be4c
Link refactoring, admin socket changes
2023-05-19 19:09:05 +01:00
Arceliar
669e61af9a
update to bugfixed ironwood, fix broken core test, add getPaths handler to admin socket
2023-05-13 16:15:04 -05: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
Arceliar
abbe94fa80
fix core tests and run gofmt on src
2023-03-26 16:34:49 -05:00
Neil Alexander
5a243d5b95
Update ironwood replace
2023-03-19 21:44:34 +00:00
Neil Alexander
a148f4cfec
More updates for Ygg v0.5
2023-03-19 10:33:07 +00:00
Neil Alexander
83c1a810b5
New handshake, use softcrdt
upstream
2023-03-18 12:14:32 +00:00
Neil
783b4d3de6
Merge branch 'develop' into bsd_build_fix
2023-02-26 21:28:29 +00:00
anon
9cbc71bc8a
Added member to Logger struct expected by tun_bsd.go
2022-12-18 00:37:34 -05:00
Neil Alexander
723097fbf6
Deduplicate some logic
2022-11-26 16:18:15 +00:00
Neil Alexander
1adc88ec77
Merge branch 'develop' into neilalexander/tryall
2022-11-26 16:00:46 +00:00
Neil Alexander
e824c73e21
Fix crash
2022-11-12 11:56:50 +00:00
Neil Alexander
7efd66932f
Redial failed connections if possible ( #983 )
2022-11-12 11:30:03 +00:00
majestrate
6fed2a75d7
Make TLS certs never expire ( #977 )
...
According to RFC5280 we can make TLS certs never expire by setting their `NotAfter` date to a value that is basically the end of time.
Fixes #976 .
2022-11-08 22:11:22 +00:00
Neil Alexander
110613b234
Try all addresses when connecting to a DNS name
...
Fixes #980
2022-11-08 21:59:13 +00:00
Neil Alexander
f08dec822a
Priority support ( #964 )
...
* Allow setting link priorities
* Fix a bug
* Allow setting priority on listeners and multicast interfaces
* Update `yggdrasilctl`
* Update to Arceliar/ironwood#5
2022-10-26 09:24:24 +01:00
Neil Alexander
9a9452dcc8
Fix panic in GetPeers
that may happen mid-link setup
2022-10-25 18:58:52 +01:00
Neil Alexander
35ea66d651
Varying connection check strictness based on scope
2022-10-22 17:45:09 +01:00
Neil Alexander
8fe1c41295
Don't reject multiple genuine links from the same host
2022-10-22 16:59:25 +01:00
Neil Alexander
d66b3ffb7a
Always allow link-local peerings again
2022-10-22 16:23:25 +01:00
Neil Alexander
63c4cb5c21
Fix reporting name for TCP
2022-10-22 15:47:09 +01:00
Neil Alexander
c55611a478
Tweak logging for connections
2022-10-22 14:56:11 +01:00
Neil Alexander
22caddef63
Don't log duplicate connection attempt
2022-10-21 19:49:49 +01:00
Neil Alexander
81839ad50d
Fix InterfacePeers
2022-10-21 19:49:15 +01:00
Neil Alexander
ee21c56e43
Fix setting nodeinfo ( closes #954 )
2022-10-15 15:42:52 +01:00
Neil Alexander
69632bacb5
Tidy up
2022-10-02 13:20:39 +01:00
Neil Alexander
428d2375da
Don't allow configuring the same peer more than once
2022-10-02 12:39:18 +01:00
Neil Alexander
8cf76f841d
Silence already connected to this node
2022-10-02 12:36:51 +01:00
ehmry
7db934488e
Reimplement AddPeer and RemovePeer for admin socket ( #951 )
...
* Reimplement AddPeer and RemovePeer for admin socket
Fix #950
* Disconnect the peer on `removePeer`
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-02 12:35:43 +01:00
Neil Alexander
c922eba2d8
Fix sending arguments to the admin socket in yggdrasilctl
2022-09-24 21:28:09 +01:00
Neil Alexander
d9fe6f72ac
Lint tweaks
2022-09-24 17:05:44 +01:00
Neil Alexander
d24d3fa047
Use deadline for link handshake ( #949 )
...
This uses a 6 second deadline for timeouts instead of using `util.FuncTimeout` at 30 seconds for the read and then again for the write.
If the handshake doesn't complete within 6 seconds then it's going to probably collapse when we give the connection to Ironwood and it tries to do a keepalive anyway.
2022-09-24 16:51:31 +01:00
Neil Alexander
0abfe78858
Silence error when reconnecting to already connected peer
2022-09-24 13:46:22 +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
5ef61faeff
Link refactor ( #941 )
...
* Link refactoring
* More refactoring
* More tweaking
* Cleaner shutdowns, UNIX socket support, more tweaks
* Actorise links, remove mutex
* SOCKS support
2022-09-17 20:07:00 +01:00
Neil Alexander
dc9720e580
Extend getSessions
admin call to include uptime/TX/RX
2022-09-03 16:55:57 +01:00
Neil Alexander
5477566fa9
Length not capacity
2022-09-03 12:38:42 +01:00
Neil Alexander
9cdfd59476
Tidy up a bit, make sure to copy the private key at startup
2022-09-03 12:34:29 +01:00
Neil Alexander
493208fb37
Refactor multicast setup (isolated config, etc)
2022-09-03 11:42:05 +01:00
Neil Alexander
dad0b10dfe
Move Core._applyOption
2022-09-03 10:51:44 +01:00
Neil Alexander
c6fe81b5d2
Admin socket and yggdrasilctl
refactoring ( #939 )
2022-09-03 10:50:43 +01:00
Neil Alexander
4f2abece81
Fix panic in tcp.init
for incorrectly formatted listen addresses
2022-09-01 16:56:42 +01:00
Neil Alexander
dd66e8a9c9
Merge branch 'develop' into neilalexander/refactor
2022-08-06 15:23:44 +01:00
Neil Alexander
16b8149052
No longer use ioutil
which is deprecated
2022-08-06 15:21:21 +01:00
Neil Alexander
4c889703b1
Continue refactoring
2022-08-06 15:05:12 +01:00
Neil Alexander
5616b9fc84
Don't lose my work
2022-07-24 10:23:25 +01:00
Neil Alexander
88a0a3e8fb
Fix data races in handleProto
(observed by @majestrate)
2022-07-07 17:03:29 +01:00
Neil Alexander
41d890bb64
Run goimports
2022-04-17 18:02:25 +01:00
Neil Alexander
2d2ad4692b
Restore uptime
, bytes_sent
and bytes_recvd
to getPeers
( #888 )
...
* Restore `uptime`, `bytes_sent` and `bytes_recvd` to the admin API for peers
* Wrap conn in Yggdrasil instead, so not necessary to do so in Ironwood
* Shuffle struct for alignment
2022-02-01 13:37:45 +00:00
Tom
9f5cc0eecb
Make message clearer and downgrade ( #812 )
...
* Make message clearer and downgrade
* Differentiate between incoming and outgoing conn
2022-01-30 21:58:57 +00:00
Arceliar
f92d812f3c
Merge pull request #822 from yggdrasil-network/sni
...
TLS Server Name Indication
2021-09-24 05:14:28 -05:00
Arceliar
6af9b61b15
Merge pull request #842 from Arceliar/mutex
...
Fix incorrect mutex use in ipv6rwc
2021-09-24 04:43:44 -05:00
Arceliar
529a33034b
gofmt to add new build comments
2021-09-23 04:34:58 -05:00
Alex Kotov
571186ca77
Rename protohandler attributes
2021-09-03 01:45:30 +05:00
Alex Kotov
3c89781057
Align and reorder code for lesser diff
2021-09-01 07:58:11 +05:00
Alex Kotov
a5f2ba80a2
Organize code in "src/core/proto.go"
2021-09-01 07:50:03 +05:00
Alex Kotov
538ee13669
Add type core.AddHandlerFunc
2021-09-01 06:16:57 +05:00
Neil Alexander
d1cd671bec
Fix bug
2021-08-01 21:39:49 +01:00
Neil Alexander
bbdff033ce
Update SNI code
2021-08-01 21:36:51 +01:00
Neil Alexander
f094cf34bf
Set SNI by default if the peering URI contains a DNS name
2021-07-28 22:23:33 +01:00
Neil Alexander
d8df9755f2
Allow specifying TLS SNI with ?sni= in peering URI
2021-07-28 22:11:20 +01:00
Arceliar
cd5383f7b7
fix core tests
2021-07-07 18:36:51 -05:00
Arceliar
3704ebf4cb
fix debug rpcs and cleanup core.Close/core.Stop
2021-07-06 19:45:12 -05:00
Neil Alexander
e224c02d6d
Revert "Add LocalAddr to complete net.PacketConn interface"
...
This reverts commit e4ce2c79a9a6430f7145798a9a3e93c544bd869c.
2021-07-05 22:35:46 +01:00
Neil Alexander
e4ce2c79a9
Add LocalAddr to complete net.PacketConn interface
2021-07-05 22:26:09 +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
Neil Alexander
9b28f725e2
Fix core_test.go
2021-06-28 18:28:56 +01:00
Neil Alexander
3646a8674c
Yggdrasil v0.4.0rc4
2021-06-28 18:21:53 +01:00
Arceliar
2db46c1250
make socks connect to tls listeners, TODO make that configurable
2021-06-25 21:40:19 -05:00
Arceliar
3b38ed082f
make failed sends a debug log, instead of error
2021-06-25 21:15:40 -05:00
Arceliar
b7f57c0617
use TLS for multicast peers, fix TLS listener type in log output
2021-06-19 10:42:38 -05:00
Arceliar
5564de94ba
when using tls, if no pinned key is set, pin the key from the cert. require that cert keys match a pinned key
2021-06-19 09:53:11 -05:00
Arceliar
1bf751a474
update ironwood, only store 1 packet in the pre-session buffer
2021-06-19 07:44:37 -05:00
Arceliar
b34c3230f8
fix core_test.go and a race in setting/using mtu
2021-06-13 13:40:20 -05:00
Arceliar
2726dc0076
don't return an error if the source address is wrong, since this happens very frequently for link-local traffic
2021-06-13 09:51:53 -05:00
Arceliar
c6a7a077a3
add remote URI to GetPeers (fallback to net.Conn.RemoteAddr().String() if the uri is unknown)
2021-06-13 09:25:08 -05:00
Arceliar
6c63b02385
Merge branch 'future' of https://github.com/yggdrasil-network/yggdrasil-go into future
2021-06-13 05:44:32 -05:00
Arceliar
8f91f0c050
fix nodeinfo and debug admin functions, this is ugly / a hack, but it works i guess...
2021-06-13 05:43:03 -05:00
Neil Alexander
c8938a3527
Add missing icmpv6.go
2021-06-13 11:34:59 +01:00
Arceliar
3393db8e77
move ICMP PacketTooBig sending into core
2021-06-13 05:25:13 -05:00
Arceliar
816356ea65
mostly finish migration of IP stuff to core, tuntap is still responsible for ICMP PacketTooBig
2021-06-13 04:54:06 -05:00
Arceliar
1147ee1934
WIP moving IP-specific checks from tuntap to core
2021-06-13 04:22:21 -05:00
Arceliar
91235980af
fix logging for socks
2021-06-12 07:03:32 -05:00
Arceliar
eeadffe4a5
move position of log line on shutdown
2021-06-12 06:07:33 -05:00
Arceliar
5b6f730f18
keep a context in the core, use it for listen/dial, cancel it when closing
2021-06-12 06:06:39 -05:00