
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
The v2ray vmess protocol, based on nodejs javascript which you can use on hosts and servers
A Node.js implementation of the V2Ray VMess protocol (plus other protocols like SOCKS and Freedom). Deployable on cPanel Node.js hosts and dedicated servers.
Install with:
npm i js2ray
Then create a file at /root/js2ray/index.js
:
var js2ray = require("js2ray");
// your config here
Run as a systemd service:
systemctl enable js2ray
systemctl restart js2ray
It will stay alive forever.
Stop the systemd service:
systemctl disable js2ray
systemctl stop js2ray
Then run manually for debugging:
node /root/js2ray/index.js
var js2ray = require("js2ray");
var config = {
inbounds: [
{
protocol: "vmess",
networks: [
{
type: "http", // ws | tcp | http | xhttp
address: "0.0.0.0",
port: 80,
option: {
path: "/ws",
fake: "hello world"
},
}
],
users: [
{
id: "b87cd5bc-71d1-e7c7-e031-24390995a198",
security: "none", // auto | aes-128-gcm | chacha20-poly1305 | none | zero
alterId: 0,
}
],
},
{
protocol: "socks",
networks: [
{
address: "0.0.0.0",
port: 1080
}
]
}
],
debug: function (...e) {
// console.log(...e)
},
storage: __dirname + "/app.json",
}
js2ray.config(config).start();
var js2ray = require("js2ray");
var config = {
inbounds: [
{
protocol: "vmess",
networks: [
{
type: "http", // ws | tcp | http | xhttp
address: "0.0.0.0",
port: 80,
option: {
path: ["/", "/data"],
fake: "hello world"
},
}
],
users: [
{
id: "b87cd5bc-71d1-e7c7-e031-24390995a155",
security: "none",
alterId: 0,
}
],
},
{
protocol: "socks",
networks: [
{
address: "0.0.0.0",
port: 1080
}
]
}
],
outbounds: [
{
tag: "outbound",
protocol: "vmess",
networks: [
{
type: "tcp",
address: "server.address",
port: 1234
}
],
users: [
{
id: "b87cd5bc-71d1-e7c7-e031-24390995a198",
security: "none",
alterId: 0,
}
],
}
],
storage: __dirname + "/app.json",
debug: function (...e) {
// console.log(...e)
},
}
js2ray.config(config).start();
You can leave users: []
and instead manage them remotely via the api
field.
var js2ray = require("js2ray");
var fs = require("fs");
var os = require("os");
var config = {
inbounds: [
{
protocol: "vmess",
networks: [
{
type: "http",
address: "0.0.0.0",
port: 80,
ip: ["1.1.1.1"] // limit clients ip
option: {
path: "/ws",
fake: "hello world"
},
}
],
users: []
},
{
protocol: "socks",
networks: [
{
address: "0.0.0.0",
port: 1080,
ip: ["1.1.1.1"] // limit clients ip
}
]
}
],
api: {
address: "0.0.0.0",
port: 2050,
post: {
task: function () {
return JSON.stringify({
rmx: Math.round(os.totalmem() / 1024 / 1024),
ram: Math.round(os.freemem() / 1024 / 1024),
net: 0 // placeholder
})
},
backup: function () {
return fs.readFileSync(__dirname + "/app.json", "utf-8");
}
}
},
storage: __dirname + "/app.json",
debug: function (...e) {
// console.log(...e)
},
}
js2ray.config(config).start();
var js2ray = require("js2ray");
var config = {
inbounds: [
{
protocol: "socks",
networks: [
{
address: "0.0.0.0",
port: 10805,
}
]
}
],
// if outbounds not defined, "freedom" is used by default
storage: __dirname + "/app.json",
}
js2ray.config(config).start();
var js2ray = require("js2ray");
var config = {
inbounds: [
{
protocol: "socks",
networks: [
{
address: "0.0.0.0",
port: 1080,
}
],
users: [
{
user: "u",
pass: "p",
}
],
}
],
outbounds: [
{
protocol: "socks",
networks: [
{
address: "remote.socks.server",
port: 1080,
}
],
users: [
{
user: "server-u",
pass: "server-p",
}
],
}
],
storage: __dirname + "/app.json",
}
js2ray.config(config).start();
FAQs
The v2ray vmess protocol, based on nodejs javascript which you can use on hosts and servers
The npm package js2ray receives a total of 19 weekly downloads. As such, js2ray popularity was classified as not popular.
We found that js2ray demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.