mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-01-12 21:57:15 +08:00
* Proxy: Implement tun raw network interface inbound support for Linux * Proxy: Tun. Include "android" as build condition for build of tun_default implementation * Proxy: Tun. Add .Close() cleanup calls to Handler.Init() where needed * Proxy: Add Tun for Android * Proxy: Tun. Implement Windows support --------- Co-authored-by: yuhan6665 <1588741+yuhan6665@users.noreply.github.com>
18 lines
301 B
Go
18 lines
301 B
Go
package tun
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Stack interface implement ip protocol stack, bridging raw network packets and data streams
|
|
type Stack interface {
|
|
Start() error
|
|
Close() error
|
|
}
|
|
|
|
// StackOptions for the stack implementation
|
|
type StackOptions struct {
|
|
Tun Tun
|
|
IdleTimeout time.Duration
|
|
}
|