New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

netget

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netget - npm Package Compare versions

Comparing version 2.3.53 to 2.3.54

src/CLI/Gateways.js

3

package.json
{
"name": "netget",
"version": "2.3.53",
"version": "2.3.54",
"description": "Rette Adepto/ Recibido Directamente.",

@@ -33,2 +33,3 @@ "type": "module",

"commander": "^12.0.0",
"inquirer": "^9.2.17",
"morgan": "^1.10.0"

@@ -35,0 +36,0 @@ },

@@ -1,49 +0,26 @@

import { execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
#!/usr/bin/env node
function configureNginx(options) {
// Verificar si Nginx está instalado
try {
execSync('nginx -v', { stdio: 'ignore' });
} catch (error) {
console.error('Nginx no está instalado.');
return;
}
import { program } from 'commander';
import { handleNetGetX } from './CLI/NetGetX.js';
import { handleGateways } from './CLI/Gateways.js';
import { handleGets } from './CLI/Gets.js';
import { NetGetMainMenu } from './CLI/netget_MainMenu.js';
// Generar y escribir el nuevo server block
const serverBlockTemplate = `
server {
listen ${options.port};
server_name ${options.domain};
program
.description('NetGet Command Line Interface')
.version('1.0.3')
.action(NetGetMainMenu);
location / {
proxy_pass http://localhost:${options.port};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
`;
program.command('netget-x')
.description('Directly interact with NetGetX')
.action(handleNetGetX);
const sitesAvailablePath = '/etc/nginx/sites-available';
const sitesEnabledPath = '/etc/nginx/sites-enabled';
const filePath = path.join(sitesAvailablePath, options.domain);
program.command('gateways')
.description('Directly manage your Gateways')
.action(handleGateways);
try {
fs.writeFileSync(filePath, serverBlockTemplate);
fs.symlinkSync(filePath, path.join(sitesEnabledPath, options.domain));
} catch (error) {
console.error('Error configurando Nginx:', error.message);
return;
}
program.command('gets')
.description('Directly configure and manage your Gets')
.action(handleGets);
// Recargar Nginx
try {
execSync('sudo nginx -s reload');
console.log(`Nginx configurado para ${options.domain} en el puerto ${options.port}.`);
} catch (error) {
console.error('Error recargando Nginx:', error.message);
}
}
program.parse(process.argv);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc