update to singbox 1.9.0 and update to warp-plus
This commit is contained in:
@@ -162,6 +162,7 @@ func Parse(in *pb.ParseRequest) (*pb.ParseResponse, error) {
|
||||
Log(pb.LogLevel_FATAL, pb.LogType_CONFIG, err.Error())
|
||||
StopAndAlert(pb.MessageType_UNEXPECTED_ERROR, err.Error())
|
||||
})
|
||||
|
||||
content := in.Content
|
||||
if in.TempPath != "" {
|
||||
contentBytes, err := os.ReadFile(in.TempPath)
|
||||
@@ -173,7 +174,7 @@ func Parse(in *pb.ParseRequest) (*pb.ParseResponse, error) {
|
||||
|
||||
}
|
||||
|
||||
config, err := config.ParseConfigContent(content, true, false)
|
||||
config, err := config.ParseConfigContent(content, true, nil, false)
|
||||
if err != nil {
|
||||
return &pb.ParseResponse{
|
||||
ResponseCode: pb.ResponseCode_FAILED,
|
||||
|
||||
@@ -143,7 +143,7 @@ func extractRefreshInterval(header http.Header, bodyStr string) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
func buildConfig(configContent string, options config.ConfigOptions) (string, error) {
|
||||
parsedContent, err := config.ParseConfigContent(configContent, true, options.EnableFullConfig)
|
||||
parsedContent, err := config.ParseConfigContent(configContent, true, &options, false)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to parse config content: %w", err)
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@ func (s *CoreService) GenerateWarpConfig(ctx context.Context, in *pb.GenerateWar
|
||||
return GenerateWarpConfig(in)
|
||||
}
|
||||
func GenerateWarpConfig(in *pb.GenerateWarpConfigRequest) (*pb.WarpGenerationResponse, error) {
|
||||
account, log, wg, err := config.GenerateWarpInfo(in.LicenseKey, in.AccountId, in.AccessToken)
|
||||
identity, log, wg, err := config.GenerateWarpInfo(in.LicenseKey, in.AccountId, in.AccessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &pb.WarpGenerationResponse{
|
||||
Account: &pb.WarpAccount{
|
||||
AccountId: account.AccountID,
|
||||
AccessToken: account.AccessToken,
|
||||
AccountId: identity.ID,
|
||||
AccessToken: identity.Token,
|
||||
},
|
||||
Config: &pb.WarpWireguardConfig{
|
||||
PrivateKey: wg.PrivateKey,
|
||||
|
||||
Reference in New Issue
Block a user