Neil Alexander
ae79246a66
Move TCP under link.go
2019-03-04 17:09:48 +00:00
Neil Alexander
0ca64b0abe
Remove ReadTimeout configuration option
2019-02-10 12:13:49 +00:00
Neil Alexander
43f798e82e
Check link-local in tcp.go, track direction in link.go, fix compile error for mobile.go
2019-02-01 00:02:17 +00:00
Neil Alexander
1a3a67f205
Merge remote-tracking branch 'origin/develop' into link
...
Fix merge conflicts from flexible logging branch
2019-01-27 20:54:21 +00:00
Neil Alexander
0838928668
Add support for flexible logging levels
2019-01-27 13:31:43 +00:00
Neil Alexander
81545fd9bf
Clean up
2019-01-23 15:16:22 +00:00
Arceliar
f936151f2d
correctly clean up various things
2019-01-22 21:48:43 -06:00
Arceliar
eb8951081d
fix duplicate connection bug, I think this is also in develop
2019-01-22 21:23:57 -06:00
Arceliar
12c0e019dc
only create one interface, but still opens duplicate connections before it catches this, so more work is needed
2019-01-22 21:16:41 -06:00
Arceliar
137212d8cf
work in progress, establishes TCP connections and gets through metadata handshake using the link code, but doesn't seem to send traffic yet (no switch peers are created)
2019-01-21 23:08:50 -06:00
Arceliar
5a4d6481dd
Work in progress, add a linkInterfaceMsgIO interface type and make stream implement it, this will be used by link
2019-01-21 21:27:52 -06:00
Arceliar
c8e1be0f73
link/stream refactoring bugfixes and gofmt
2019-01-19 16:37:45 -06:00
Neil Alexander
6fe3b01e90
Rename awdl.go to link.go, add stream.go, update tcp.go
2019-01-19 00:14:10 +00:00
Neil Alexander
c839012580
Fix source address selection
2019-01-17 23:06:59 +00:00
Neil Alexander
8baf593b62
Update source address selection when sintf specified
2019-01-16 14:52:27 +00:00
Neil Alexander
4fba558638
Fix concurrent map write in tcp.go
2019-01-16 13:20:12 +00:00
Neil Alexander
53be1b02f3
Check if accepting socket produced an error
2019-01-15 08:53:57 +00:00
Neil Alexander
2cd373fc1e
Remove unnecessary selects
2019-01-15 08:51:19 +00:00
Neil Alexander
738a9da796
Merge branch 'develop' into nodeconfig
2019-01-14 14:01:38 +00:00
Neil Alexander
4622a85c34
AWDL support for macOS/iOS
2019-01-13 18:08:41 +00:00
Neil Alexander
cd86c33850
Try to tidy up a bit, move checks for if we are already calling/connected
...
Something I noticed when working on reconfigure support for the "Listen"
option is that we have some rather huge weaknesses in our multicasting
design. Right now if we change our Listen address, it's not really
possible for remote nodes to know whether they are still connected to
us, so they start connecting in response to our changed beacons. They
can't know that they already know about us until *after* the handshake
but this registers in the local client log as repeated Connect/Disconnects
even though the existing peerings never actually drop.
2018-12-30 21:11:16 +00:00
Neil Alexander
80c9a1bc12
Don't track localAddr in conns as it is irrelevant
2018-12-30 16:48:34 +00:00
Neil Alexander
cb4495902b
Allow updating Listen during runtime
2018-12-30 15:21:09 +00:00
Neil Alexander
2925920c70
Use mutex in switch/tcp init
2018-12-29 19:53:31 +00:00
Neil Alexander
fa7c4117b4
Use Core.config in init functions
2018-12-29 19:14:26 +00:00
Arceliar
300f471bab
don't SetKeepAlive[Period] on tcp connections, since the behavior is platform specific
2018-12-16 18:32:50 -06:00
Arceliar
28c7d75a20
fix conflicts with nodeinfo and update that for new crypto type names
2018-12-15 18:11:02 -06:00
Arceliar
570e85c297
remove debug code
2018-12-14 21:12:25 -06:00
Arceliar
ea4ca02681
fix code after moving address/crypto/util
2018-12-14 20:49:18 -06:00
Arceliar
abd8b69979
send a switch message immediately when peering, and use OS-level TCP keep-alive (shouldn't matter right now, since we have application-level keep-alive that preempts it, but important later)
2018-12-14 18:15:35 -06:00
Neil Alexander
aab0502a4a
Remove friendlyname traces, preserve endpoints
2018-10-21 23:20:14 +01:00
Neil Alexander
b809adf981
Add FriendlyName option, show friendly name and real endpoint in admin socket/yggdrasilctl
2018-10-21 17:57:48 +01:00
Neil Alexander
2e2c58bfef
Add session firewall (extra security for controlling traffic flow to/from a given node)
2018-10-07 17:13:41 +01:00
Neil Alexander
8eed15b813
Fix merge conflict in tcp.go from d027a9ba75baa88207f9c4f2c337f59ded83e6e7
2018-10-04 12:26:08 +01:00
Neil Alexander
b530916044
Show information about individual active queues
2018-09-27 12:14:55 +01:00
Neil Alexander
b7f2f8b55c
Ignore interfaces that are not up
2018-09-25 19:46:06 +01:00
Neil Alexander
387ae9ea6c
Only replace call name with interface prefix when interface is set
2018-09-25 18:05:57 +01:00
Neil Alexander
aecc151baf
Add support for specifying TCP source interface, i.e. tcp://a.b.c.d:e/eth0, for multiple simultaneous peerings to the same node over different interfaces
2018-09-25 15:32:45 +01:00
cathugger
d171552577
Make TCP read timeouts configurable.
...
This should be helpful on high-latency networks, like Tor or I2P.
Also gofmt.
2018-07-29 14:30:13 +00:00
cathugger
91a374d698
rearrange tcp reading loop
...
according to documentation of io.Reader interface,
"Callers should always process the n > 0 bytes returned before considering the error err. Doing so correctly handles I/O errors that happen after reading some bytes and also both of the allowed EOF behaviors."
2018-07-19 21:58:53 +00:00
cathugger
f4bb2aaaeb
More verbose disconnect messages
2018-07-19 01:03:24 +00:00
Arceliar
7695a3fcbf
try using a simpler FIFO order for each backpressure buffer, since there are other mechanisms to penalize the flooding node, leads to better TCP throughput without affecting traffic between other nodes (does affect traffic in the same session, but there's hypothetically workarounds to that)
2018-06-24 20:20:07 -05:00
Arceliar
4b83efa218
more backpressure work, still needs testing
2018-06-23 21:51:32 -05:00
Arceliar
2ae213c255
I'll try sorting, that's a good trick
2018-06-23 01:10:18 -05:00
Arceliar
cceecf4b1a
larger out queue size, make sure linkOut packets always get sent first
2018-06-22 23:46:42 -05:00
Arceliar
0021f3463f
slightly better way for the tcp sender goroutine(s) to block waiting for work
2018-06-22 20:39:57 -05:00
Arceliar
254be42614
gofmt
2018-06-21 10:39:43 -05:00
Arceliar
19014a198e
randomize the delay after tcp disconnects, to prevent synchronization issues
2018-06-21 10:38:31 -05:00
Arceliar
496dc94f02
possibly mitigate livelock bug where lossy links lead to constant connect/disconnect cycles due to disagreement about which of the two duplicate autoconnection attempts to use
2018-06-16 15:31:25 -05:00
Arceliar
d9c9787611
avoid the proxy.SOCK5 connection attempt unless we're actually going to use the dialer
2018-06-14 09:21:35 -05:00