Skip to content

Commit

Permalink
fix vless link
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxilu committed Aug 25, 2021
1 parent 581e3b8 commit 4c4a70e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ bin/config.json
dist/
x-ui-*.tar.gz
/x-ui
/release.sh
/release.sh
.sync*
12 changes: 0 additions & 12 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion web/service/xray.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4c4a70e

Please sign in to comment.