npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coccoc-proxyme

v1.3.61

Published

A CLI for setup proxy server with Web GUI traffic monitoring

Downloads

5

Readme

PROXYME

💻 A command line interface (CLI) to setup a proxy server for:

  • Proxy server setup
  • Packets forwarding
  • Port forwarding
  • Traffics monitoring

🔵 During development phase, sometimes we want to test local environment measures how it behaves on production environment. Proxyme cuts back time on creating a self-signed certificate yourself (for establishing secure connection aka HTTPS you know it right?), reconfiguring your proxy server with a bunch of code... through a CLI with simple inputs.

This CLI fits these real-life development scenarios:

✅ You want to mock any API served at localhost to an actual domain.

✅ You want to to test several features before deploying to Heroku or any cloudbase hosting which have technologies requires HTTPS connection such as Web Workers or Application Cache. Proxyme can mock this in your local machine.

✅ You want to bypass CORS policies set by a certain server. Specifically, you want to request to example.api.com but it only allows requests from some certain origins (domains). You can mock a whitelisted doamin with self-signed certificates generated by Proxyme and request to the API normally.

Installation:

npm i -g coccoc-proxyme proxyme --init

Usage:

proxyme

Explanation:

proxyme --help

proxyme [Options]
Options:
  --init         Init proxyme
  --publicPath   Set your proxyme public path, where to generate necessary files - default ./
  --proxyHost    Your proxy host - default 0.0.0.0
  --proxyPort    Your proxy port - RANDOM
  --debugHost    Your debug host - default 0.0.0.0
  --debugPort    Your debug port - default 2300
  --pac          Your PAC (Proxy Auto-Config) URL - default 6970
  --configPath   Your config path
  --profilePath  Your profile contain rules path
  --certDir      Your certificate directory - should be in ./certs
  -V, --version  output the version number
  -h, --help     output usage information

--init: Generate proxyme settings in the current folder, you can also specify publicPath where it generates necessary files. Default: ./ After init, the proxyme settings will be like this:

--publicPath: Where you wants to generate settings

--pac: (Optional) Your Proxy Auto Config URL. For example: http://0.0.0.0:6970/index.pac

--debugHost debugPort: Host and port for setup web GUI monitoring/debug toool.

--profile: Your proxyme profile configuration. The default.json has already generated for you when init: Currently PROXYME only supports level 1 path

Configuration File Structure:

certs
config
└── config.json
profiles
└── default.json

config/config.json (Follow this format):

{
	"rules": {
		"example.com": [
			{
				"somepath": [
					{},
					{
						"host": "",
						"port": null
					}
				]
			},
			{
				"host": "",
				"port": null,
			}
		]
	}
}

example.com: is the targeted domain. Eg. abc.com

somepath: is the next level path. Eg: abc.com/posts

host: is the target host you want to direct to

port: is the targeted port you want to direct to

profiles/default.json (Follow this format):

{
	"pac": "",
	"proxyHost": "0.0.0.0",
	"proxyPort": 6969,
	"debugHost": "0.0.0.0",
	"debugPort": 2300,
	"certDir": "[your-init-directory]/.http-mitm-proxy/certs/ca.pem"
}
  • The default for certificate directory [your-init-directory]/.http-mitm-proxy/certs/ca.pem, For custom certificates, navigate to certs. Place a new pair of cert and key with this format.
[host]-cert.pem
[host]-key.pem
  • Proxy forwarding: It's simple, add directWithoutRewrite: true in your profiles. For example:
{
  "host": "example.com",
  "port: 6754
  "directWithoutRewrite": true
}

Proxyme can forward your trafficts to host and port above.