Update: add config route
This commit is contained in:
@ -16,8 +16,8 @@ import (
|
||||
|
||||
const (
|
||||
Name = "clash"
|
||||
DefalutHTTPPort = "7890"
|
||||
DefalutSOCKSPort = "7891"
|
||||
DefalutHTTPPort = 7890
|
||||
DefalutSOCKSPort = 7891
|
||||
)
|
||||
|
||||
var (
|
||||
@ -26,6 +26,13 @@ var (
|
||||
MMDBPath string
|
||||
)
|
||||
|
||||
type General struct {
|
||||
Mode *string `json:"mode,omitempty"`
|
||||
AllowLan *bool `json:"allow-lan,omitempty"`
|
||||
Port *int `json:"port,omitempty"`
|
||||
SocksPort *int `json:"socks-port,omitempty"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
currentUser, err := user.Current()
|
||||
if err != nil {
|
||||
|
7
constant/proxy.go
Normal file
7
constant/proxy.go
Normal file
@ -0,0 +1,7 @@
|
||||
package constant
|
||||
|
||||
// ProxySignal is used to handle graceful shutdown of proxy
|
||||
type ProxySignal struct {
|
||||
Done chan<- struct{}
|
||||
Closed <-chan struct{}
|
||||
}
|
Reference in New Issue
Block a user