Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Read IP address from exists tun+ interface

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
networking

Research direction

Start at the TUN inbound startup path that produces the “missing interface address” error, then trace how addresses are discovered for an existing interface. Reproduce with the provided sing-box configuration and opkgtun0 setup; done means the existing TUN adapter’s IPv4 and IPv6 addresses are read without the startup failure.

Written by the indexing model from the issue text.

Description

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
Dominant language
Go
Stars
241
Forks
243
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SagerNet/sing-tun

All issues in SagerNet/sing-tun

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.