Fixed Trojan server name bug

This commit is contained in:
Peng-YM 2020-09-14 09:44:00 +08:00
parent 1cecbe541e
commit 8504738ee1
2 changed files with 2 additions and 2 deletions

View File

@ -1012,7 +1012,7 @@ function URI_Trojan() {
} }
line = line.split("trojan://")[1]; line = line.split("trojan://")[1];
const server = line.split("@")[1].split(":443")[0]; const server = line.split("@")[1].split(":443")[0];
const name = line.split("#")[1].trim(); const name = decodeURIComponent(line.split("#")[1].trim());
return { return {
name: name || `[Trojan] ${server}`, // trojan uri may have no server tag! name: name || `[Trojan] ${server}`, // trojan uri may have no server tag!

File diff suppressed because one or more lines are too long