Documentation ¶
Index ¶
- Constants
- Variables
- func CheckDnsMsg(data []byte) bool
- func FileServer(router *chi.Mux)
- func MakeDnsMsg(host string) ([]byte, error)
- func ParseProxiesFromClashConfig(content []byte) ([]map[string]any, error)
- func ParseProxiesFromClashUrl(url string) ([]map[string]any, error)
- func Start(addr string) error
- func UdpTest(pc net.PacketConn, target string) (bool, error)
- type HTTPError
- type Log
- type RouterHandler
- type Status
- type Traffic
- type TrafficItem
Constants ¶
View Source
const DnsMsg = "google.com."
Variables ¶
View Source
var (
ErrBadRequest = NewError("Body invalid")
)
Functions ¶
func CheckDnsMsg ¶
func FileServer ¶
func FileServer(router *chi.Mux)
func MakeDnsMsg ¶
Types ¶
type HTTPError ¶
type HTTPError struct {
Message string `json:"message"`
}
HTTPError is custom HTTP error for API
type RouterHandler ¶
type RouterHandler func(r chi.Router)
type Traffic ¶
type Traffic struct { Proxy TrafficItem `json:"proxy"` Direct TrafficItem `json:"direct"` }
type TrafficItem ¶
Click to show internal directories.
Click to hide internal directories.