🎨 Modify some code

This commit is contained in:
2024-04-23 14:41:14 +08:00
parent acf547f173
commit 0456c8f802
7 changed files with 45 additions and 26 deletions

View File

@@ -32,7 +32,11 @@ func ParseVmess(proxy string) (model.Outbound, error) {
case string:
port, err = ParsePort(vmess.Port.(string))
if err != nil {
return model.Outbound{}, err
return model.Outbound{}, &ParseError{
Type: ErrInvalidPort,
Message: err.Error(),
Raw: proxy,
}
}
case float64:
port = uint16(vmess.Port.(float64))