你的位置:首页 > 互联网IT
portfwd端口转发端口映射工具/Windows
系统:window 64
下载地址:portfwd-windows-amd64-20190905.rar
项目地址:https://github.com/muzea/portfwd
使用案列:
要求配置文件和程序放在一起,且名字必须是 config.json
, 配置文件格式为
{
"proxy": {
"3000": "127.0.0.1:10086"
},
"APIPort": ":3001"
}
{
"proxy": {
"本地端口": "域名与IP:端口"
},
"APIPort": ":3001" //这个可以删除
}
一个低性能端口转发实现
使用
要求配置文件和程序放在一起,且名字必须是 config.json
, 配置文件格式为
interface Config {
proxy: {
[localPort: string]: string;
}
APIPort: string;}
其中 APIPort
为 api 监听的端口。
示例参见 示例配置
web 控制台
提供了一个简陋的web。
api
均要求数据为
application/json
类型描述为typescript
ping
GET /ping
request
无
response
interface Resp {
message: 'pong'}
add
POST /proxy
request
interface Req {
local: string // 比如 "10086"
targrt: string //比如 "127.0.0.1:10010"}
response
interface Resp {
message: 'done'}
update
PATCH /proxy/:localPort
request
interface Req {
targrt: string //比如 "127.0.0.1:10010"}
response
interface Resp {
message: 'done'}
delete
DELETE /proxy/:localPort
request
无
response
interface Resp {
message: 'done'}
proxy config
GET /proxy
request
无
response
type Resp = {
[k in keyof ProxyPool]: string}
proxy item
GET /proxy/:localPort
request
无
response
interface Resp {
local: string
target: string}
发表评论: