Versions in this module Expand all Collapse all v0 v0.0.1 Sep 18, 2023 Changes in this version + var CtxKeyProvider = contextKey("provider") + var CtxKeyProviderName = contextKey("provider name") + var CtxKeyProxy = contextKey("proxy") + var CtxKeyProxyName = contextKey("proxy name") + var ErrBadRequest = newError("Body invalid") + var ErrForbidden = newError("Forbidden") + var ErrNotFound = newError("Resource not found") + var ErrRequestTimeout = newError("Timeout") + var ErrUnauthorized = newError("Unauthorized") + func NewServer(ctx context.Context, router adapter.Router, logFactory log.ObservableFactory, ...) (adapter.ClashServer, error) + type HTTPError struct + Message string + func (e *HTTPError) Error() string + type Log struct + Payload string + Type string + type Memory struct + Inuse uint64 + OSLimit uint64 + type PatchScriptRequest struct + Script string + type Rule struct + Payload string + Proxy string + Type string + type Server struct + func (s *Server) CacheFile() adapter.ClashCacheFile + func (s *Server) Close() error + func (s *Server) HistoryStorage() *urltest.HistoryStorage + func (s *Server) Mode() string + func (s *Server) ModeList() []string + func (s *Server) PreStart() error + func (s *Server) RoutedConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, ...) (net.Conn, adapter.Tracker) + func (s *Server) RoutedPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, ...) (N.PacketConn, adapter.Tracker) + func (s *Server) SetMode(newMode string) + func (s *Server) SetModeUpdateHook(hook chan<- struct{}) + func (s *Server) Start() error + func (s *Server) StoreFakeIP() bool + func (s *Server) StoreSelected() bool + func (s *Server) TrafficManager() *trafficontrol.Manager + type Traffic struct + Down int64 + Up int64 + type UpdateProxyRequest struct + Name string