fix vless link

This commit is contained in:
sprov
2021-08-25 09:42:20 +08:00
parent 581e3b835a
commit 4c4a70e742
3 changed files with 3 additions and 14 deletions

3
.gitignore vendored
View File

@@ -5,4 +5,5 @@ bin/config.json
dist/
x-ui-*.tar.gz
/x-ui
/release.sh
/release.sh
.sync*

View File

@@ -1010,18 +1010,6 @@ class Inbound extends XrayCommonClass {
params.set("flow", this.settings.vlesses[0].flow);
}
for (const [key, value] of params) {
switch (key) {
case "host":
case "path":
case "seed":
case "key":
case "alpn":
params.set(key, encodeURIComponent(value));
break;
}
}
const link = `vless://${uuid}@${address}:${port}`;
const url = new URL(link);
for (const [key, value] of params) {

View File

@@ -87,7 +87,7 @@ func (s *XrayService) GetXrayTraffic() ([]*xray.Traffic, error) {
func (s *XrayService) RestartXray(isForce bool) error {
lock.Lock()
defer lock.Unlock()
logger.Debug("restart xray")
logger.Debug("restart xray, force:", isForce)
xrayConfig, err := s.GetXrayConfig()
if err != nil {