forked from smallflyzhu/XrayR
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add default config to prevent nil problem
- Loading branch information
Showing
5 changed files
with
81 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package panel | ||
|
||
import "github.com/XrayR-project/XrayR/service/controller" | ||
|
||
func getDefaultLogConfig() *LogConfig { | ||
return &LogConfig{ | ||
Level: "none", | ||
AccessPath: "", | ||
ErrorPath: "", | ||
} | ||
} | ||
|
||
func getDefaultConnetionConfig() *ConnetionConfig { | ||
return &ConnetionConfig{ | ||
Handshake: 4, | ||
ConnIdle: 10, | ||
UplinkOnly: 2, | ||
DownlinkOnly: 4, | ||
BufferSize: 64, | ||
} | ||
} | ||
|
||
func getDefaultControllerConfig() *controller.Config { | ||
return &controller.Config{ | ||
ListenIP: "0.0.0.0", | ||
SendIP: "0.0.0.0", | ||
UpdatePeriodic: 60, | ||
DNSType: "AsIs", | ||
CertConfig: &controller.CertConfig{ | ||
CertMode: "none", | ||
}, | ||
FallBackConfigs: []*controller.FallBackConfig{ | ||
&controller.FallBackConfig{}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters