crash.software
Projects
Pull Requests
Issues
Builds
sing-box
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
sing-box
Files
🤬
Sign In
e5f3bb63
ROOT
/
experimental
/
clashapi
/
server.go
Search
History
397 lines
|
ISO-8859-1
|
10 KB
Blame
Outline
2
4
8
No wrap
Soft wrap
Outline
init
()
_
:
adapter.ClashServer
Server
router
:
adapter.Router
logger
:
log.Logger
httpServer
:
*http.Server
trafficManager
:
*trafficontrol.Manager
urlTestHistory
:
*urltest.HistoryStorage
mode
:
string
storeSelected
:
bool
cacheFilePath
:
string
cacheFile
:
adapter.ClashCacheFile
NewServer
(router adapter.Router, logFactory log.ObservableFactory, options option.ClashAPIOptions)
:
(adapter.ClashServer, error)
castMetadata
(metadata adapter.InboundContext)
:
trafficontrol.Metadata
authentication
(serverSecret string)
:
func(next http.Handler) http.Handler
hello
(redirect bool)
:
func(w http.ResponseWriter, r *http.Request)
upgrader
Traffic
Up
:
int64
Down
:
int64
traffic
(trafficManager *trafficontrol.Manager)
:
func(w http.ResponseWriter, r *http.Request)
Log
Type
:
string
Payload
:
string
getLogs
(logFactory log.ObservableFactory)
:
func(w http.ResponseWriter, r *http.Request)
version
(w http.ResponseWriter, r *http.Request)
*Server
PreStart
()
:
error
Start
()
:
error
Close
()
:
error
Mode
()
:
string
StoreSelected
()
:
bool
CacheFile
()
:
adapter.ClashCacheFile
HistoryStorage
()
:
*urltest.HistoryStorage
RoutedConnection
(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, matchedRule adapter.Rule)
:
(net.Conn, adapter.Tracker)
RoutedPacketConnection
(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext, matchedRule adapter.Rule)
:
(N.PacketConn, adapter.Tracker)
All occurrences
Please wait...
Page is in error, reload to recover