👏🏻 欢迎加入社群进行交流讨论
👥 群组 折腾啥(群组)
📢 频道 折腾啥(频道)
⚠️ If a proxy is already running on the device runninghttp-meta
, you may need to exclude thehttp-meta
process.
Create a folder /data/http-meta
Download http-meta.bundle.js, rename it to http-meta.bundle.js
and move it to the /data/http-meta
folder.
Create a folder /data/http-meta/meta
Download Meta, rename it to http-meta
and move it to the /data/http-meta/meta
folder.
Download tpl.yaml, rename it to tpl.yaml
and move it to the /data/http-meta/meta
folder.
META_FOLDER
can be the absolute path of themeta
folder if neccessary.
META_TEMP_FOLDER
can be the absolute path of the temp folder if neccessary. Defaults to the default directory for temporary files of the operating system. This path may have to be provided in the Android environment.
META_TEMP_FOLDER=/data/http-meta META_FOLDER=/data/http-meta/meta HOST=127.0.0.1 PORT=9876 node http-meta.bundle.js
cd /data
git clone https://github.com/xream/http-meta.git http-meta
cd /data/http-meta
Download Meta, rename it to http-meta
and move it to the /data/http-meta/meta
folder.
cd /data/http-meta
pnpm i
META_FOLDER
can be the absolute path of themeta
folder if neccessary.
META_TEMP_FOLDER
can be the absolute path of the temp folder if neccessary. Defaults to the default directory for temporary files of the operating system. This path may have to be provided in the Android environment.
META_TEMP_FOLDER=/data/http-meta META_FOLDER=/data/http-meta/meta HOST=127.0.0.1 PORT=9876 pnpm start
Set the AUTHORIZATION
environment variable to enable authorization.
Add the Authorization
header to the request.
curl '127.0.0.1:9876/test'
{
"pid": 35955,
"log":"INFO Mixed(http+socks)[listener-proxy-0] proxy listening at: [::]:65535",
"config": "bind-address: 0.0.0.0\nallow-lan: true"
}
curl '127.0.0.1:9876/start' \
--header 'Content-Type: application/json' \
--data '{
"timeout": 1800000, // process will be killed after 30 minutes(default)
"proxies": [
{
"name": "1",
"server": "1.2.3.4",
"port": 80,
"type": "vmess",
...
}
]
}'
{
"ports": [
65534,
65533
],
"pid": 61289
}
curl '127.0.0.1:9876/start' \
--header 'Content-Type: application/json' \
--data '{
"timeout": 1800000, // process will be killed after 30 minutes(default)
"proxies": [
{
"name": "1",
"server": "1.2.3.4",
"port": 80,
"type": "vmess",
...
},
{
"name": "2",
"server": "1.2.3.4",
"port": 80,
"type": "vmess",
...
}
]
}'
{
"ports": [
65534,
65533
],
"pid": 61289
}
curl --request POST '127.0.0.1:9876/stop'
curl '127.0.0.1:9876/stop' \
--header 'Content-Type: application/json' \
--data '{
"pid": [
1,
2
]
}'
{
"pid": null
}
curl '127.0.0.1:9876/stats' \
--header 'Content-Type: application/json'
{
"35955": {
"pid": 35955,
"mem": "2MB",
"cpu": "0%"
}
}
curl '127.0.0.1:9876/stats' \
--header 'Content-Type: application/json' \
--data '{"pid": [35955]}'
{
"35955": {
"pid": 35955,
"ports": [
65534,
65533
],
"mem": "2MB",
"cpu": "0%"
}
}
port
: proxy port
ntp
: ntp server(default: time.apple.com
)
timeout
: timeout(default: 3000
ms)
curl '127.0.0.1:9876/udp' \
--header 'Content-Type: application/json' \
--data '{
"port": 35955,
"ntp": "time.apple.com",
"timeout": 2000
}'
{
"data": "ok"
}