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

r_proxy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r_proxy

  • 0.2.8
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RProxy

a powerful ruby http proxy server, base on eventmachine

able to run in multi-process like nginx workers

Installation

Add this line to your application's Gemfile:

gem 'r_proxy'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install r_proxy

Usage

Currently only support BSD, Linux and MacOS

Http and Https proxy server

integrated with Redis, if you enable auth then you must provide redis url to let server connect to redis.

e.g: server.set(:redis_url, "redis://@localhost:6379/1")

redis key rule: proxy:username-password

redis value rule: integer string e.g: 1234567

the value describe how many bytes that user can use.

unit: bytes

require 'r_proxy'

server = RProxy::MasterProcess.new

server.set(:host, '127.0.0.1')
server.set(:port, 8080)

# set how many instances process that you want to run.
# master process will looking after those process,
# if any of them exit, will auto re-create new instance.
# if want to quit all, just kill master process.
server.set(:instances, 3)

# if disable_auth is true
# then server will not auth user and password
# server.set(:disable_auth, true)

# if disable unbind cb, then it mean
# server will not decrby usage for user
# server.set(:disable_unbind_cb, true)

# default is true 
server.set(:enable_ssl, true) 

server.set(:callback_url,'http://127.0.0.1:1234')

server.set(:redis_url, "redis://@localhost:6379/1")

server.set(:ssl_private_key, './server_key.txt')
server.set(:ssl_cert, './server_cert.txt')

server.set(:logger, Logger.new(STDOUT))
# logger output like:
# I, [2020-05-08T21:04:00.492477 #86348]  INFO -- : r_proxy @1588935840 process start....
# I, [2020-05-08T21:04:21.534989 #87168]  INFO -- : r_proxy rebuild new instance replace @1588935861....

# call run to start server
server.run!

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nickoan/r_proxy.

FAQs

Package last updated on 11 May 2020

Did you know?

Socket

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.

Install

Related posts

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