Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
outlinevpn-api
Advanced tools
A Nodejs Client package for managing Outline servers: Jigsaw-Code/outline-server
GitHub: github.com/murka/outlinevpn-api
NPM: npm.im/outlinevpn-api
import { OutlineVPN } from "outlinevpn-api";
const client = new OutlineVPN({
apiUrl: "https://your-server.com/api",
fingerprint: "your-server-certificate-fingerprint",
});
// Returns: Server details including name, ID, metrics status etc.
const server = await client.getServer();
const success = await client.renameServer("My Server");
const success = await client.setHostnameForAccessKeys("example.com");
const success = await client.setPortForNewAccessKeys(12345);
// Set default data limit for new keys
await client.setDefaultDataLimit(1000000000); // 1GB in bytes
// Remove default data limit
await client.deleteDefaultDataLimit();
const accessKeys = await client.getAccessKeys();
// Create with default settings
const key = await client.createAccessKey();
// Create with custom options
const customKey = await client.createAccessKey({
name: "Custom Key",
password: "custom-password",
port: 8388,
});
// Create with specific ID
const keyWithId = await client.createAccessKeyWithId("custom-id", {
name: "Named Key",
});
// Get specific key
const key = await client.getAccessKey("key-id");
// Rename key
await client.renameAccessKey("key-id", "New Name");
// Set data limit for key
await client.addDataLimit("key-id", 1000000000); // 1GB
// Remove data limit
await client.deleteDataLimit("key-id");
// Delete key
await client.deleteAccessKey("key-id");
// Get data usage per access key
const usage = await client.getDataUsage();
// Get metrics sharing status
const metrics = await client.getShareMetrics();
// Enable/disable metrics sharing
await client.setShareMetrics(true);
The API throws several types of errors:
try {
await client.getAccessKey("non-existent");
} catch (error) {
if (error instanceof NotFoundError) {
// Handle 404
} else if (error instanceof ValidationError) {
// Handle validation errors
} else if (error instanceof OutlineError) {
// Handle other API errors
}
}
interface Server {
name: string;
serverId: string;
metricsEnabled: boolean;
createdTimestampMs: number;
portForNewAccessKeys?: number;
hostnameForAccessKeys?: string;
accessKeyDataLimit?: {
bytes: number;
};
version?: string;
}
interface AccessKey {
id: string;
name: string;
password: string;
port: number;
method: string;
accessUrl: string;
limit?: {
bytes: number;
};
}
Code | Description |
---|---|
200 | Successful GET request |
201 | Resource created successfully |
204 | Successful operation with no content |
400 | Invalid request/parameters |
404 | Resource not found |
409 | Conflict (e.g., port already in use) |
500 | Server error |
FAQs
The Outline VPN API client
The npm package outlinevpn-api receives a total of 12 weekly downloads. As such, outlinevpn-api popularity was classified as not popular.
We found that outlinevpn-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.