Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
svps
Advanced tools
Readme
π An easier tool to automate your Ubuntu Server setup and domain forwarding
SVPS, initially designed to simplify tasks for non-Unix users, works as an ORM for Ubuntu Servers.
It supports command automation, files and directories upload via SFTP, automatic installations and configurations, domain forwarding, local text files and template strings into escaped quoted strings for dynamic remote file creation, among other features.
All this, using just a single one connection π§π»β¨
npm i svps
import { SVPS } from 'svps';
/** Prepare the connection */
const svps = new SVPS({
access: {
host: '127.0.0.1',
username: 'root',
password: 'root',
},
});
/** For AWS */
const svps = new SVPS({
access: {
host: '***.amazonaws.com',
username: 'ubuntu',
privateKey: fs.readFileSync('./your_rsa.pem'),
},
});
/** Available methods
* svps.mount
* svps.commands
* svps.createVirtualHosts
* svps.upload
* svps.end
*
* See about each below π΅π»
*/
await svps.mount({
php: true || { version: 8.2, composer: true },
node: true || { version: 18, packages: ['yarn'] },
apache: true,
docker: true,
// ...
/**
* ... Users, Desktop (RDP), Firewall, etc.
*
* See all available automatic installations below ππ»
*/
});
apt
commandsufw
) settings
22
by defaultvsftpd
) by enabling it for any userSee some practical examples.
Create your own commands and combine with other SVPS features.
const commands = ['echo "π"'];
await svps.commands(commands);
escapeQuotes
method to create multi-line escaped quoted strings. See an example here.Transfer your local files and directories and set permissions for each upload.
await svps.upload([
{
local: './my-app-dist',
remote: '/workspace',
permissions: {
user: 'my-user',
},
},
]);
Download your remote files.
await svps.download([
{
remote: '/workspace/backup.zip',
local: './my-local-path/backup.zip',
},
]);
await svps.createVirtualHosts([
// Basic or Advanced Virtual Hosts
]);
/**
* This will create a log with the processed domains to ensure that only new domains are processed.
* If you delete this log, the domains will be understood as new and will be overwritten.
*/
You can automatically create Node.js (LTS) and PHP (8.2) services and work on them in /var/containers/domains
/your_domain
.
Also, it allows to use an exclusive MySQL database for each domain.
await svps.createVirtualHosts([
{
domain: 'site.com',
port: 5000,
www: true /** creates an alias for "www.site.com" */,
server: {
language: 'node' | 'php',
mysql: {
database: 'db-name',
password: 'db-pass',
expose: 5001 /** expose port 5001 locally */,
isPublic: true /** expose port 5001 outside the VPS */,
},
},
},
]);
server
option buildFromScratch
as true
to create the Virtual Host image from scratch, otherwise it will pull the images from my Docker Hub ππ»ββοΈTo create flexible Basic Virtual Hosts, SVPS uses Docker containers and Apache2 to proxy their ports to your domains.
Apache2, Docker and Docker Compose required.
See some practical examples here.
By using the Virtual Hosts solely to proxy your services, you can create services in any language you choose, by simply defining the port your service is on.
await svps.createVirtualHosts([
{
domain: 'site.com',
port: 5000,
www: true /** creates an alias for "www.site.com" */,
},
]);
// It will proxy your service at port 5000 to "site.com" and "www.site.com"
Apache2 required.
await svps.mount({
desktop: true,
});
/** That's it π€Ήπ»ββοΈ */
3389
3389
See a practical example using a Docker container.
Create the container:
docker run -d --privileged -p 22:22 --restart always wellwelwel/vps:latest
-p 3389:3389
if you want to test it using Remote Desktop ProtocolThen, set the default access:
const svps = new SVPS({
access: {
host: '127.0.0.1',
username: 'root',
password: 'root',
port: 22,
},
});
await svps.end();
>=18.04
>=18
is not compatible with Ubuntu 18.04
I'm continuously working to improve SVPS. If you've got something interesting to share, feel free to submit a Pull Request. If you notice something wrong, I'd appreciate if you'd open an Issue.
Please check the CONTRIBUTING.md for instructions π
FAQs
π An easier tool to automate your Ubuntu Server setup and domain forwarding
The npm package svps receives a total of 26 weekly downloads. As such, svps popularity was classified as not popular.
We found that svps 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.