From 6e09c44d1731ffd06654a86517a8004e63a4c424 Mon Sep 17 00:00:00 2001 From: Nite07 Date: Tue, 8 Oct 2024 10:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=20#43?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser/shadowsocksr.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/parser/shadowsocksr.go b/parser/shadowsocksr.go index 8c9bace..9139068 100644 --- a/parser/shadowsocksr.go +++ b/parser/shadowsocksr.go @@ -28,7 +28,14 @@ func ParseShadowsocksR(proxy string) (model.Proxy, error) { protocol := parts[2] method := parts[3] obfs := parts[4] - password := parts[5] + password, err := DecodeBase64(parts[5]) + if err != nil { + return model.Proxy{}, &ParseError{ + Type: ErrInvalidStruct, + Raw: proxy, + Message: err.Error(), + } + } port, err := ParsePort(parts[1]) if err != nil { return model.Proxy{}, &ParseError{