Skip to content

🌌 像传送门一样穿透NAT网络访问HTTP服务。Access the HTTP service through a NAT network like a portal.

License

Notifications You must be signed in to change notification settings

cascax/http_portal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to HTTP-Portal 👋

License: MIT

像传送门一样穿透NAT网络访问HTTP服务

Access the HTTP service through a NAT network like a portal

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.

About

🌌 像传送门一样穿透NAT网络访问HTTP服务。Access the HTTP service through a NAT network like a portal.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages