http_portal

module
v0.0.0-...-19631d5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT

README ยถ

Welcome to HTTP-Portal ๐Ÿ‘‹

ๅƒไผ ้€้—จไธ€ๆ ท็ฉฟ้€NAT็ฝ‘็ปœ่ฎฟ้—ฎHTTPๆœๅŠก

Access the HTTP service through a NAT network like a portal

๐Ÿ  Homepage

portal

๐Ÿ“ฆ Install

# install agent
go get -u github.com/cascax/http_portal/portal_agent

# install server
go get -u github.com/cascax/http_portal/portal_server

๐Ÿš€ Usage

start portal server

portal_server -c ./portal_server.yml

start portal agent

portal_agent -c ./portal_agent.yml

๐Ÿ”ง Configuration

An example for the server's config file

http_server:
  listen: 0.0.0.0
  port: 8080

proxy_server:
  listen: 0.0.0.0
  port: 10625
  # forward request to the client(mccode) according to the Host
  portal:
    mccode:
      - "local.mccode.info"

# configuration of the log file
log:
  path: "."
  name: server.log
  # log files' max size (MB)
  max_size: 100
  max_backup: 5
  # valid value: debug info warn error panic fatal
  level: info

An example for the agent's config file

portal_agent:
  name: mccode
  # portal server's address
  remote_addr: 127.0.0.1:10625
  # replace the request's host
  host_rewrite:
    local.mccode.info: local.mccode.info:8081

# same as above
log:
  path: "."
  name: agent.log
  max_size: 100
  max_backup: 5
  level: info

Author

๐Ÿ‘ค cascax

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

This project is MIT licensed.

Directories ยถ

Path Synopsis

Jump to

Keyboard shortcuts

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