https://github.com/teatak/pipe
a reverse proxy server
https://github.com/teatak/pipe
reverse-proxy server
Last synced: 5 months ago
JSON representation
a reverse proxy server
- Host: GitHub
- URL: https://github.com/teatak/pipe
- Owner: teatak
- License: mit
- Created: 2021-03-14T14:27:16.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-09-26T02:44:47.000Z (9 months ago)
- Last Synced: 2025-09-26T04:27:44.942Z (9 months ago)
- Topics: reverse-proxy, server
- Language: Go
- Homepage:
- Size: 19.2 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pipe
a reverse proxy server
```yaml
backend:
- name: test
mode: hash #random 随机 roundRobin 轮训 hash 哈希 consistentHash 一致性哈希
riff: test@riff://localhost:8630 #riff service
- name: riff
mode: hash
server:
- http://127.0.0.1:8610
- http://127.0.0.1:8610
server:
- listen: "[::]:80"
domain:
- name: _
location:
# return static folder [static path fallback_file_path]
- path: /static/
return: "static /Users/yanggang/workspace/github.com/teatak/pipe/static/ /Users/yanggang/workspace/github.com/teatak/pipe/static/index.html"
# return a file
- path: /favicon.ico
return: "file /Users/yanggang/workspace/github.com/teatak/pipe/static/favicon.ico"
# return string
- path: ~ ^/string$ # regex
return: "string 200 hello string"
# redirect
- path: /https
return: "redirect 301 https://$host$request_uri"
# redirect
- path: /redirect
return: "redirect 301 /string"
# multiple delimiters ; or ,
- path: /backend;/back,/end
return: "backend test"
# default
- path: /
return: "string 200 default"
- listen: "[::]:443"
ssl: true
domain:
- name: dev.x-t.top console.teatak.com
certFile: "/Users/yanggang/workspace/cert/dev.x-t.top.pem"
keyFile: "/Users/yanggang/workspace/cert/dev.x-t.top.key"
location:
- path: /
return: "backend test"
- path: /ws
return: "backend riff"
- path: /api
return: "backend riff"
- path: /console
return: "backend riff"
- path: /static/
return: "backend riff"
- path: /bad
return: "backend bad"
- path: /test
return: "backend test"
- name: teatak.com www.teatak.com
certFile: "/Users/yanggang/workspace/cert/teatak.com.pem"
keyFile: "/Users/yanggang/workspace/cert/teatak.com.key"
location:
- path: /
return: "backend test"
- name: _
certFile: "/Users/yanggang/workspace/cert/teatak.com.pem"
keyFile: "/Users/yanggang/workspace/cert/teatak.com.key"
location:
- path: /
return: "string 200 index"
header:
- "Content-Type text/plain; charset=utf-8"
# proxy: http://console
```