Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gulp-nproxy
Advanced tools
A cli/gulp-plugin proxy tool specialized in file replacing. fork from Goddy Zhao <goddy128@gmail.com> nproxy
A gulp http proxy plugin. Full support nproxy feature.
Maybe you have such question as why NProxy when we have Fiddler, Charles, Rythem and Tinyproxy. Yes, there is no doubt that they are all great tools, however they don't meet my requirements:
This is the main reason why NProxy is here. Besides, NProxy can improve the efficiency of my daily development for enterprise-level product with a bunch of complex building processes, which cost me lots of time.
I've written a post named NProxy: The Mjolnir for UI Developers and a keynote NProxy: A Sharp Weapon for UI Developers to explain my reason for developing NProxy in detail.
npm install -g gulp-nproxy (node >= v0.8.x is required)
var nproxy = require('gulp-nproxy');
nproxy({
timeout: 10, // Specify the request timeout (5 seconds by default)
debug: false, // display debug log
version: '', // output the version number
port: 8989, // Specify the port nproxy will listen on(8989 by default)
// redirect rule
rule: [
{
pattern: '(.*).js', // Match url you wanna replace
responder: '/Users/isken/projects/nproxy/test-script.js'
},
]
});
[
// 1. replace single file with local one
{
pattern: 'homepage.js', // Match url you wanna replace
responder: "/home/goddyzhao/workspace/homepage.js"
},
// 2. replace single file with web file
{
pattern: 'homepage.js', // Match url you wanna replace
responder: "http://www.anotherwebsite.com/assets/js/homepage2.js"
},
// 3. replace combo file with src with absolute file path
{
pattern: 'group/homepageTileFramework.*.js',
responder: [
'/home/goddyzhao/workspace/webapp/ui/homepage/js/a.js',
'/home/goddyzhao/workspace/webapp/ui/homepage/js/b.js',
'/home/goddyzhao/workspace/webapp/ui/homepage/js/c.js'
]
},
// 4. replace combo file with src with relative file path and specified dir
{
pattern: 'group/homepageTileFramework.*.js',
responder: {
dir: '/home/goddyzhao/workspace/webapp/ui/homepage/js',
src: [
'a.js',
'b.js',
'c.js'
]
}
},
// 5. Map server image directory to local image directory
{
pattern: 'ui/homepage/img', // must be a string
responder: '/home/goddyzhao/image/' //must be a absolute directory path
},
// 6. Write responder with regular expression variables like $1, $2
{
pattern: /https?:\/\/[\w\.]*(?::\d+)?\/ui\/(.*)_dev\.(\w+)/,
responder: 'http://localhost/proxy/$1.$2'
},
// 7. Map server image directory to local image directory with regular expression
// This simple rule can replace multiple directories to corresponding locale ones
// For Example,
// http://host:port/ui/a/img/... => /home/a/image/...
// http://host:port/ui/b/img/... => /home/b/image/...
// http://host:port/ui/c/img/... => /home/c/image/...
// ...
{
pattern: /ui\/(.*)\/img\//,
responder: '/home/$1/image/'
}
];
MIT
FAQs
A cli/gulp-plugin proxy tool specialized in file replacing. fork from Goddy Zhao <goddy128@gmail.com> nproxy
The npm package gulp-nproxy receives a total of 0 weekly downloads. As such, gulp-nproxy popularity was classified as not popular.
We found that gulp-nproxy demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.