https://github.com/junyugit/gproxy
GO语言实现的HTTP请求代理跳板服务 - golang implementation of http request proxy jump service
https://github.com/junyugit/gproxy
golang httpproxy
Last synced: 3 months ago
JSON representation
GO语言实现的HTTP请求代理跳板服务 - golang implementation of http request proxy jump service
- Host: GitHub
- URL: https://github.com/junyugit/gproxy
- Owner: junyugit
- License: mulanpsl-2.0
- Created: 2023-03-27T02:09:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T03:28:57.000Z (about 3 years ago)
- Last Synced: 2024-12-29T17:42:19.086Z (over 1 year ago)
- Topics: golang, httpproxy
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gproxy
golang implementation of http request proxy jump service
## How to use
Modify the configuration file in the config directory
`app.yml`
```yaml
# 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`
```yaml
#... 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`