MCPcopy Index your code
hub / github.com/SagerNet/sing-tun

github.com/SagerNet/sing-tun @v0.8.11

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.8.11 ↗ · + Follow
1,554 symbols 4,388 edges 145 files 800 documented · 51% 3 cross-repo links updated 1d ago★ 22317 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

sing-tun

Simple transparent proxy library.

For Linux, Windows, macOS and iOS.

License

Copyright (C) 2022 by nekohasekai <contact-sagernet@sekai.icu>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Extension points exported contracts — how you extend this code

Stack (Interface)
(no doc) [10 implementers]
stack.go
DirectRouteContext (Interface)
(no doc) [11 implementers]
tun.go
IPv4SerializableOption (Interface)
IPv4SerializableOption is an interface to represent serializable IPv4 option types. [3 implementers]
internal/gtcpip/header/ipv4.go
ChangeCallback (Interface)
(no doc) [3 implementers]
internal/winipcfg/types.go
NetworkUpdateMonitor (Interface)
(no doc) [2 implementers]
monitor.go
DirectRouteDestination (Interface)
(no doc) [2 implementers]
route_direct.go
AutoRedirect (Interface)
(no doc) [1 implementers]
redirect.go
PackageManager (Interface)
(no doc) [1 implementers]
packages.go

Core symbols most depended-on inside this repo

Pointer
called by 304
internal/gtcpip/header/icmpv4.go
Addr
called by 82
internal/wintun/dll_windows.go
Unlock
called by 70
internal/fdbased_darwin/endpoint_mutex.go
Lock
called by 65
internal/fdbased_darwin/endpoint_mutex.go
Addr
called by 63
internal/winipcfg/types.go
Close
called by 57
tun.go
SetChecksum
called by 54
internal/gtcpip/header/interfaces.go
NewProc
called by 50
internal/wintun/dll_windows.go

Shape

Method 912
Function 350
Struct 168
TypeAlias 94
Interface 30

Languages

Go100%

Modules by API surface

internal/gtcpip/header/ipv4.go104 symbols
internal/winipcfg/types.go81 symbols
internal/gtcpip/header/ndp_options.go74 symbols
internal/gtcpip/tcpip.go59 symbols
internal/gtcpip/header/tcp.go51 symbols
tun_offload_linux.go46 symbols
internal/gtcpip/header/ipv6_extension_headers.go41 symbols
internal/gtcpip/header/ipv6.go40 symbols
internal/winipcfg/zwinipcfg_windows.go34 symbols
tun_linux.go33 symbols
stack_system.go33 symbols
internal/gtcpip/header/interfaces.go32 symbols

For agents

$ claude mcp add sing-tun \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact