MCPcopy Create free account
hub / github.com/Ridter/cf_workers_proxy / getVLESSConfig

Function getVLESSConfig

js/worker.js:602–638  ·  view source on GitHub ↗

* * @param {string} userID * @param {string | null} hostName * @returns {string}

(userID, hostName)

Source from the content-addressed store, hash-verified

600 * @returns {string}
601 */
602function getVLESSConfig(userID, hostName) {
603 const outboundConfig = {
604 "protocol": "vless",
605 "settings": {
606 "vnext": [
607 {
608 "address": hostName,
609 "port": 443,
610 "users": [
611 {
612 "id": userID,
613 "level": 0,
614 "encryption": "none"
615 }
616 ]
617 }
618 ]
619 },
620 "streamSettings": {
621 "network": "ws",
622 "security": "tls",
623 "tlsSettings": {
624 "serverName": hostName,
625 "allowInsecure": false
626 },
627 "wsSettings": {
628 "path": "/?ed=2048",
629 "headers": {
630 "Host": hostName
631 }
632 }
633 },
634 "tag": "cloudflare"
635 };
636
637 return JSON.stringify(outboundConfig, null, 2);
638}

Callers 1

fetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected