Comments (5)
Is 58% the best we can have with integration tests? Does CI support IPv6? Why isn't the DHT joining code running? I think we could do a lot more.
from newnode.
Currently the tests don't use DHT. Instead injector_helper
knows about injector
through a command line argument.
I did it this way because:
- The
injector
to which theinjector_helper
connects must be deterministic in tests. - Given that the
injector
is only supposed to connect to the testinjector_helper
it very likely has not punched a hole through the NAT before theinjector_helper
attempts to connect.
(1) could potentially be solved by solving issue #13.
(2) is a bit trickier. I think Travis CI workers are not behind a NAT, not 100% sure though. In such case it would work there. For people behind a NAT though, the test would work only if they:
- Have a NAT with support for hairpinning. Or
- Explicitly open a UDP in their NAT. Or
- We use something like uPnP. Or
- We try to punch a hole ourselves.
I think I'd first try the fourth option...
Does CI support IPv6?
I'll check, but does libbtdht
even supports IPv6? I was under the impression it doesn't (the string nodes6
is nowhere to be found in libbtdht
as described by BEP0032, also the callback for finding nodes does not mentions type of the endpoints because only IPv4 is assumed).
from newnode.
There's some untested IPv6 code. Do we need it? If yes, let's cover; if not, let's remove?
from newnode.
There's some untested IPv6 code. Do we need it? If yes, let's cover; if not, let's remove?
AFAIK, that is really only three lines here and here (both are a copy/paste from here). We don't necessarily NEED it as it seems libbtdht
doesn't support IPv6. On the other hand it's something we WANT, so the other course of action would be to add support for it in libbtdht
.
But even if we did add it, I haven't yet checked whether Travis supports IPv6, so we still may not be able to cover it with tests.
from newnode.
Just to have a complete picture: It seems the OSX Travis workers do have a support for IPv6, while Linux workers don't.
OSX:
# ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=b<RXCSUM,TXCSUM,VLAN_HWTAGGING>
ether 00:50:56:9a:09:1b
inet6 fe80::401:bc6b:ccc3:99e0%en0 prefixlen 64 secured scopeid 0x4
inet 10.182.152.84 netmask 0xffffc000 broadcast 10.182.191.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (1000baseT <full-duplex>)
status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::5c1f:7261:1086:5686%utun0 prefixlen 64 scopeid 0x5
nd6 options=201<PERFORMNUD,DAD>
Linux:
#ifconfig
eth0 Link encap:Ethernet HWaddr 42:01:0a:0a:17:ca
inet addr:10.10.23.202 Bcast:10.10.23.202 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1460 Metric:1
RX packets:11979 errors:0 dropped:0 overruns:0 frame:0
TX packets:8618 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:190239647 (190.2 MB) TX bytes:830041 (830.0 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:18041 (18.0 KB) TX bytes:18041 (18.0 KB)
Adding a support for IPv6 however would seem like a task in itself. Here are the courses of action I can see, @shalunov please let me know which one you prefer:
- Leave the status quo (my preference for the MVP).
- Remove the 6 lines mentioning IPv6.
- Modify
injector.c
,injector_helper.c
andtest_server.c
to use IPv6 when possible + leavelibbtdht
unchanged. - As above, but also modify
libbtdht
to support IPv6.
from newnode.
Related Issues (20)
- jCenter deprecation HOT 3
- Swift Package Manager integration issues HOT 1
- ios crashes - newnode_init HOT 3
- Building and linking Android library HOT 13
- Feature request: Bugsnag opt-out
- Feature request: opt out from sending statistics to stats.newnode.com
- Feature request: opt out from searching near by devices and using Bluetooth on iOS HOT 3
- iOS. NewNode proxy does not receive connections after returning app from background HOT 8
- BatteryLevelReceiver ClassNotFoundException HOT 2
- Publish SHA256 checksums with releases HOT 1
- Couldn't get NearBy to work on Android HOT 3
- wget subprocess crashes on Ubuntu 22.04 HOT 3
- Fireside with NewNode 2.0.5 crashes on devices with Android API < 31 HOT 1
- bug in the client HOT 2
- Can't run project on iOS simulator on M1 macbook
- iOS asking for permission even when disabled
- iOS VPN: ViewController Architecture Problem HOT 2
- [Feature Request] Remove SMS registration in NewNode messenger HOT 2
- restart BTLE after backgrounding HOT 2
- [iOS] Registration doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newnode.