mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-10-26 09:11:01 +00:00
Refactor subscription handling by removing SubConfig model, updating BuildSub function to use ConvertConfig, and enhancing Base64 decoding across parsers. Update routes and frontend to support new configuration format.
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
P "github.com/bestnite/sub2clash/model/proxy"
|
||||
"github.com/bestnite/sub2clash/utils"
|
||||
)
|
||||
|
||||
type SocksParser struct{}
|
||||
@@ -59,7 +60,7 @@ func (p *SocksParser) Parse(config ParseConfig, proxy string) (P.Proxy, error) {
|
||||
password, hasPassword := link.User.Password()
|
||||
|
||||
if !hasPassword && isLikelyBase64(username) {
|
||||
decodedStr, err := DecodeBase64(username)
|
||||
decodedStr, err := utils.DecodeBase64(username, true)
|
||||
if err == nil {
|
||||
usernameAndPassword := strings.SplitN(decodedStr, ":", 2)
|
||||
if len(usernameAndPassword) == 2 {
|
||||
|
||||
Reference in New Issue
Block a user