mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-01 17:25:02 +00:00
Enhancements
Fix potential crash when parsing some stream nodes. Add support for some other types of stream/expiry time nodes. Update build scripts.
This commit is contained in:
6 files changed
+33
-27
No files matched your search
+2
-1
@@ -19,13 +19,14 @@ common:
|
||||
|
||||
userinfo:
|
||||
stream_rule:
|
||||
- {match: "^剩余流量:(.*?)\\|总流量:(.*)$", replace: "total=$2&left=$1"}
|
||||
- {match: "^剩余流量:(.*?) (.*)$", replace: "total=$1&left=$2"}
|
||||
- {match: "^Bandwidth: (.*?)/(.*)$", replace: "used=$1&total=$2"}
|
||||
- {match: "^.*剩余(.*?)(?:\\s*?)@(?:.*)$", replace: "total=$1"}
|
||||
- {match: "^.*?流量:(.*?) 剩:(?:.*)$", replace: "total=$1"}
|
||||
time_rule:
|
||||
- {match: "^过期时间:(\\d+)-(\\d+)-(\\d+) (\\d+):(\\d+):(\\d+)$", replace: "$1:$2:$3:$4:$5:$6"}
|
||||
- {match: "^到期时间:(\\d+)-(\\d+)-(\\d+)$", replace: "$1:$2:$3:0:0:0"}
|
||||
- {match: "^到期时间(:|:)(\\d+)-(\\d+)-(\\d+)$", replace: "$1:$2:$3:0:0:0"}
|
||||
- {match: "^Smart Access expire: (\\d+)/(\\d+)/(\\d+)$", replace: "$1:$2:$3:0:0:0"}
|
||||
- {match: "^.*?流量:(?:.*?) 剩:(.*?)天$", replace: "left=$1d"}
|
||||
|
||||
|
||||
+2
-1
@@ -52,6 +52,7 @@ append_proxy_type=false
|
||||
;Rules to extract stream data from node
|
||||
;Format: full_match_regex|new_format_regex
|
||||
;where new_format_regex should be like "total=$1&left=$2&used=$3"
|
||||
stream_rule=^剩余流量:(.*?)\|总流量:(.*)$|total=$2&left=$1
|
||||
stream_rule=^剩余流量:(.*?) (.*)$|total=$1&left=$2
|
||||
stream_rule=^Bandwidth: (.*?)/(.*)$|used=$1&total=$2
|
||||
stream_rule=^\[.*?\]剩余(.*?)@(?:.*)$|total=$1
|
||||
@@ -61,7 +62,7 @@ stream_rule=^.*?流量:(.*?) 剩:(?:.*)$|total=$1
|
||||
;Format: full_match_regex|new_format_regex
|
||||
;where new_format_regex should follow this example: yyyy:mm:dd:hh:mm:ss
|
||||
time_rule=^过期时间:(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)$|$1:$2:$3:$4:$5:$6
|
||||
time_rule=^到期时间:(\d+)-(\d+)-(\d+)$|$1:$2:$3:0:0:0
|
||||
time_rule=^到期时间(:|:)(\d+)-(\d+)-(\d+)$|$1:$2:$3:0:0:0
|
||||
time_rule=^Smart Access expire: (\d+)/(\d+)/(\d+)$|$1:$2:$3:0:0:0
|
||||
time_rule=^.*?流量:(?:.*?) 剩:(.*)$|left=$1d
|
||||
|
||||
|
||||
Reference in new issue
Block a user