op-packages/luci-app-xray/root/usr/share/xray/protocol/vmess.mjs
github-actions[bot] 32600acc60 🌴 Sync 2026-03-05 23:51:42
2026-03-05 23:51:42 +08:00

34 lines
1.2 KiB
JavaScript

"use strict";
import { port_array, stream_settings } from "../common/stream.mjs";
export function vmess_outbound(server, tag) {
const stream_settings_object = stream_settings(server, "vmess", tag);
const stream_settings_result = stream_settings_object["stream_settings"];
const dialer_proxy = stream_settings_object["dialer_proxy"];
return {
outbound: {
protocol: "vmess",
tag: tag,
settings: {
vnext: map(port_array(server["server_port"]), function (v) {
return {
address: server["server"],
port: v,
users: [
{
email: server["username"],
id: server["password"],
alterId: int(server["alter_id"]),
security: server["vmess_security"]
}
]
};
})
},
streamSettings: stream_settings_result
},
dialer_proxy: dialer_proxy
};
};