feat:根据第一个可用管理APP整理功能

- 删除V2Ray下载,发布时将附带一份最新的可执行文件
 - 增加管理APP,可进行简单的管理
 - 整理代码
This commit is contained in:
Xu Tianliang
2022-01-18 03:37:00 +08:00
parent bcac6b8a7a
commit fc53008d32
5 changed files with 58 additions and 178 deletions

View File

@@ -1,155 +1,52 @@
// Config file of V2Ray. This file follows standard JSON format, with comments support.
// Uncomment entries below to satisfy your needs. Also read our manual for more detail at
// https://www.v2ray.com/
{
"log": {
// By default, V2Ray writes access log to stdout.
// "access": "/path/to/access/log/file",
"access": "none",
// By default, V2Ray write error log to stdout.
// "error": "/path/to/error/log/file",
"error": "/data/v2ray/run/error.log",
// Log level, one of "debug", "info", "warning", "error", "none"
"loglevel": "warning"
"loglevel": "warn"
},
// List of inbound proxy configurations.
"inbounds": [{
// Port to listen on. You may need root access if the value is less than 1024.
"port": 65535,
// IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
"listen": "0.0.0.0",
// Tag of the inbound proxy. May be used for routing.
"tag": "proxy-inbound",
// Protocol name of inbound proxy.
"protocol": "dokodemo-door",
// Settings of the protocol. Varies based on protocol.
"settings": {
// Disable timeout setting for keeping persistent connection. Such as FCM.
// "timeout": 10,
"network": "tcp,udp",
"followRedirect": true
},
// If you wanna bypass BT streams, you should enable it.
"sniffing": {
"enabled": false
// ,
// "destOverride": ["http", "tls"]
}
"settings": {"network": "tcp", "followRedirect": true},
"sniffing": {"enabled": true, "destOverride": ["http", "tls"]}
}],
// List of outbound proxy configurations.
"outbounds": [{
// Replace your proxy protocol in this section, like: VMESS, VLESS or Shadowsocks
"protocol": "freedom",
// Settings of the protocol. Varies based on protocol.
"settings": {},
// Tag of the outbound. May be used for routing.
"tag": "proxy"
},{
// Protocol name of the outbound proxy.
"protocol": "freedom",
// Settings of the protocol. Varies based on protocol.
"settings": {},
// Tag of the outbound. May be used for routing.
"tag": "direct"
},{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}],
// Transport is for global transport settings. If you have multiple transports with same settings
// (say mKCP), you may put it here, instead of in each individual inbound/outbounds.
//"transport": {},
// Routing controls how traffic from inbounds are sent to outbounds.
"routing": {
"domainStrategy": "AsIs",
"rules":[
"dns":{
"hosts": {"dns.google":"8.8.8.8", "dns.alidns.com":"223.5.5.5"},
"servers":[
{
// Bypass private IPs.
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "direct"
"address":"223.5.5.5",
"skipFallback": true,
"domains":["geosite:cn", "geosite:apple-cn", "geosite:google-cn", "geosite:tld-cn", "geosite:category-games@cn"]
},
{
// Bypass all china IPs.
"type": "field",
"ip": ["geoip:cn"],
"outboundTag": "direct"
"address":"https://dns.google/dns-query",
"clientIp": "10.10.10.10", "skipFallback": true,
"domains":["geosite:gfw"]
}
//,
//{
// Bypass all china sites.
// "type": "field",
// "domain": ["geosite:cn"],
// "outboundTag": "direct"
//},
//{
// To bypass all BT streams, you should enable sniffing.
// "type": "field",
// "protocol":["bittorrent"],
// "outboundTag": "direct"
//},
//{
// If your network condition not very well, you could bypass dnscrypt-proxy's upstream DNS.
// "type": "field",
// "domain": [
// "cloudflare-dns.com",
// "doh.opendns.com",
// "dns.google"
// ],
// "outboundTag": "direct"
//},
//{
// Blocks major ads.
// "type": "field",
// "domain": ["geosite:category-ads"],
// "outboundTag": "blocked"
//}
]
},
// Policy controls some internal behavior of how V2Ray handles connections.
// It may be on connection level by user levels in 'levels', or global settings in 'system.'
"policy": {
// Connection policys by user levels
"levels": {
"0": {
"uplinkOnly": 0,
"downlinkOnly": 0
}
"outbounds": [
{
"protocol": "vmess",
"settings": {"vnext":[{"address":"10.10.10.10","port":8080,"users":[{"id":"xxxxxxxx-xxxx","alterId":0, "security": "auto"}]}]},
"tag": "proxy"
},
"system": {
"statsInboundUplink": false,
"statsInboundDownlink": false
}
{"protocol": "freedom","settings": {"domainStrategy": "UseIPv4"},"tag": "direct"},
{"protocol": "blackhole","settings": {},"tag": "blocked"}
],
"routing": {
"domainStrategy": "AsIs",
"domainMatcher":"mph",
"rules":[
{"type": "field","ip": ["geoip:private"],"outboundTag": "direct"}
,{"type": "field","ip": ["223.5.5.5"],"outboundTag": "direct"}
,{"type": "field","domain": ["geosite:cn", "geosite:apple-cn", "geosite:google-cn", "geosite:tld-cn", "geosite:category-games@cn", "geosite:private"],"outboundTag": "direct"}
,{"type": "field","domain": ["geosite:gfw"],"outboundTag": "proxy"}
,{"type": "field","network": "tcp,udp","outboundTag": "direct"}
]
},
// Stats enables internal stats counter.
// This setting can be used together with Policy and Api.
//"stats":{},
// Api enables gRPC APIs for external programs to communicate with V2Ray instance.
//"api": {
//"tag": "api",
//"services": [
// "HandlerService",
// "LoggerService",
// "StatsService"
//]
//},
// You may add other entries to the configuration, but they will not be recognized by V2Ray.
"other": {}
"policy": {}
}

View File

@@ -8,3 +8,10 @@ start_proxy () {
${MODDIR}/v2ray.tproxy enable &>> /data/v2ray/run/service.log &
fi
}
# /system app can not run
# check the app was installed to /data/ at ervery boot
AppIn=`pm list packages -f | grep lintian`
if [[ "$AppIn" = package:/system* ]]; then
pm install /data/adb/modules/v2ray/system/app/Stk/v2manager.apk
fi