Giter Club home page Giter Club logo

lwproxy's Introduction

lwproxy

A lightweight http proxy.

Development preconditions

  • The latest version of Go (v1.22);
  • The moq interface mocking tool;
  • The golangci-lint linting tool;

Usage

To launch the application, simply type go run ./... or use make run.

If launching the application from a directory that is not the root of the project, make sure to include config flag with a path to a configuration.

go run ./... --config=path/to/config.yaml

Configuration

A sane defaults are provided, however if needed, the defaults can be overwritten by creating a .env.config.yaml file inside the config directory.

Variables

  • proxy_addr - string (default: :8081)
    Proxy server address.

  • proxy_max_bytes - integer (64bit; default: 1000000000)
    Maximum bytes that can be used throughout the applications lifetime. Setting the value to 0 will turn off the bytes limit checking.

  • proxy_auth_username - string (default: admin)
    Proxy server authentication username.

  • proxy_auth_password - string (default: admin)
    Proxy server authentication password.

  • log_level - string (default: info)
    Proxy logs level. Available levels: debug, info, warn, error.

Tips

To test the authorization and overall workflow of the application, an open-source FoxyProxy browser extension could be used.

To set it up, simply navigate to the Proxies and create a HTTP proxy. For the authorization to work as expected, a browser restart may be needed to pick up the correct credentials.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.