Files
G10h4ck 7e2c613054 net: add UPnP IGD NAT traversal support
Implement opt-in UPnP IGD port forwarding for P2P nodes behind NAT,
enabling inbound connections without manual router configuration.
This is gated behind the `upnp-igd` feature flag.

Changes:
- Add PortMapping trait for pluggable port-mapping protocols (UPnP, PCP, NAT-PMP...)
- Add optional oxy-upnp-igd v0.1 dependency behind `upnp-igd`
- Parse UpnpConfig (enabled, discovery_timeout, lease_duration, description,
  refresh_interval) from listener URL
- Periodically refresh external address and publish it to the P2P network
- Add UPnP-specific error handling
- Enable `upnp-igd` feature in darkirc (opt-in; not enabled by default)

Port mappings are created lazily once a gateway is discovered and are
automatically renewed. External addresses are tagged `source=upnp` and
refreshed at a configurable interval.

Signed-off-by: Gioacchino Mazzurco <gio@polymathes.cc>
Reviewed-by: grug
Reviewed-by: upgrayedd
2026-02-13 13:33:29 +02:00
..
2025-02-05 13:24:44 +01:00
2026-01-01 11:40:45 +00:00
2026-01-02 17:28:09 +00:00

darkirc

Check the Installation Guide for more detailed information about the ins and outs of darkirc.

Android build

  1. Install android-ndk
  2. Compile openssl with the Android toolchain
  3. Compile sqlcipher with the Android toolchain and the openssl lib
  4. Compile darkirc

OpenSSL

$ git clone https://github.com/openssl/openssl
$ cd openssl
$ export ANDROID_NDK_ROOT="/opt/android-ndk"
$ export PATH="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH"
$ ./Configure android-arm64 -D__ANDROID_API__=32
$ make -j$(nproc)

SQLcipher

$ git clone https://github.com/sqlcipher/sqlcipher
$ cd sqlcipher
$ sed -e 's/strchrnul//' -i configure
$ export ANDROID_NDK_ROOT="/opt/android-ndk"
$ export PATH="$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH"
$ CC=aarch64-linux-android32-clang \
  CPPFLAGS="-I$PWD/../openssl/include" \
  LDFLAGS="-L$PWD/../openssl" \
  ./configure \
      --host=aarch64-linux-android32 \
      --disable-shared \
      --enable-static \
      --enable-cross-thread-connections \
      --enable-releasemode \
      --disable-tcl
$ make -j$(nproc)
$ ./libtool --mode install install libsqlcipher.la $PWD

DarkIRC

$ make darkirc.android64