go-reverse-proxy

command module
v0.0.0-...-6194147 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: GPL-3.0 Imports: 19 Imported by: 0

README

goinx

Multiple domain reverse proxy with golang

Feature

  • Support static server
  • Support multi domain proxy
  • Support HTTPS

Usage

By Golang

Build File

go install

go build //Windows

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build // To run in alpine

Run File

» ./goinx
Author: asyrafduyshart
Github: https://github.com/asyrafduyshart/go-reverse-proxy

Usage: goinx [start|stop|restart]

Options:

    --config    Configuration path
    --help      Help info

Config File

{
    "log_level": "debug",
    "access_log": null,
    "redis" : {
        "url" : "redis://localhost:6379",
        "key" : "user:config",
        "field": "ip_whitelist"
    },
    "http": {
        "servers": [
            {
                "name": "site2"
            },
            {
                "name": "site3",
                "listen": "9003",
                "files": [
                    {
                        "path" : "example-path",
                        "location" : "index-path",
                        "index" : "index.html"
                    }
                ]
            },
            {
                "name": "site",
                "listen": "9001",
                "proxies": [
                    {
                        "proxy_pass": "https://httpbin.org",
                        "proxy_path": "/httpbin",
                        "request_headers": [
                            {
                                "Authentication": "Basic 123456"
                            },
                            {
                                "Yomama": "Pk"
                            }
                        ]
                    },
                    {
                        "proxy_pass": "https://postman-echo.com",
                        "proxy_path": "/postman",
                        "request_headers": [
                            {
                                "Authentication": "Basic 11235453"
                            }
                        ]
                    }
                ],
                "domains": [
                    "localhost"
                ],
                "root": "www"
            }
        ]
    }
}

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