diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-03-07 10:11:03 +0300 |
|---|---|---|
| committer | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-03-07 10:11:03 +0300 |
| commit | 7483fb2ec57055f5f4f0fb14e559a87a5c2106f9 (patch) | |
| tree | d16e022cd195924ee94da87d96a821d06ddd32cf /web/assets/js/model | |
| parent | 2d8cca3a2ec1ae9034b7bc28a2fb5f2260f43e1a (diff) | |
refactor: delete `base64js`
instead of base64 library you can use built-in JS functions `btoa()` and `atob()`
Diffstat (limited to 'web/assets/js/model')
| -rw-r--r-- | web/assets/js/model/inbound.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index d3d7d297..49fc8a7b 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -1302,7 +1302,7 @@ class Inbound extends XrayCommonClass { } } - return 'vmess://' + base64(JSON.stringify(obj, null, 2)); + return 'vmess://' + Base64.encode(JSON.stringify(obj, null, 2)); } genVLESSLink(address = '', port = this.port, forceTls, remark = '', clientId, flow) { @@ -1474,7 +1474,7 @@ class Inbound extends XrayCommonClass { if (this.isSS2022) password.push(settings.password); if (this.isSSMultiUser) password.push(clientPassword); - let link = `ss://${safeBase64(settings.method + ':' + password.join(':'))}@${address}:${port}`; + let link = `ss://${Base64.encode(`${settings.method}:${password.join(':')}`, true)}@${address}:${port}`; const url = new URL(link); for (const [key, value] of params) { url.searchParams.set(key, value) |
