Skip to content

Read IP address from exists tun+ interface #58

@avengermsoft

Description

@avengermsoft

Some routers have an additional interface for tunnel configuration TUN.
Add the ability to read IP addresses from an existing TUN adapter.

sing-box config

  "inbounds": [
    {
      "type": "tun",
      "interface_name": "opkgtun0",
      "domain_strategy": "ipv4_only",
      "auto_route": false,
      "strict_route": false,
      "sniff": true
   }
  ]

ifconfig opkgtun0

opkgtun0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:172.16.0.2  P-t-P:172.16.0.2  Mask:255.255.255.255
          inet6 addr: fadd:4700:110:::2/128 Scope:Global
          POINTOPOINT NOARP MULTICAST  MTU:65535  Metric:1
          RX packets:219 errors:0 dropped:0 overruns:0 frame:0
          TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:150

Now

 ~  # sing-box run --config /tmp/1.json --directory /tmp
INFO[0000] network: updated default interface eth3, index 7
TRACE[0000] inbound/tun[0]: creating stack
FATAL[0000] start service: start inbound/tun[0]: missing interface address

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions