gproxy

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2023 License: MulanPSL-2.0 Imports: 5 Imported by: 0

README

gproxy

golang implementation of http request proxy jump service

How to use

Modify the configuration file in the config directory

app.yml


# Indicates the http protocol configuration that the service listens on
http:
  enabled: true
  listen-addr: ":80"

## Indicates the https protocol configuration for service listening
# https:
#   enabled: false
#   listen-addr: ":443"
#   cert-file:
#   key-file

# http request proxy mapping configuration
maps:
  test.bd1: https://baidu.com
  tww.bd2: https://www.baidu.com
maps:

Modify the above configuration and start. When the request address: http://localhost:80/test.bd1/s? ie=UTF-8&wd=golang ', the proxy service will request: https://baidu.com/s?ie=UTF-8&wd=golang. The request host and test.bd1 section will be replaced with https://baidu.com

global maps:

app.yml


#... Same as above

# http request proxy mapping configuration
maps:
  /: https://www.baidu.com

When the address: http://localhost:80 is requested, the proxy service will request https://www.baidu.com

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL