mirror of
https://github.com/coolsnowwolf/packages
synced 2025-01-08 11:17:36 +08:00
xray-core: update to 24.10.16
This commit is contained in:
parent
c4eec2a9f9
commit
982dbed1f7
@ -1,12 +1,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=xray-core
|
PKG_NAME:=xray-core
|
||||||
PKG_VERSION:=1.8.24
|
PKG_VERSION:=24.10.16
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_HASH:=86e3e388c77cda4d8457a607356416c201c1f18bbed53f0a9e76a228508ff298
|
PKG_HASH:=2964cf0cc7cb1b631591cc49c49160d1a478d2f83e4f0a1081e0bc6cc38d8725
|
||||||
|
|
||||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||||
PKG_LICENSE:=MPL-2.0
|
PKG_LICENSE:=MPL-2.0
|
||||||
|
@ -1,144 +0,0 @@
|
|||||||
// Config file of Xray. 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://xtls.github.io/en/config/
|
|
||||||
{
|
|
||||||
"log": {
|
|
||||||
// By default, Xray writes access log to stdout.
|
|
||||||
// "access": "/path/to/access/log/file",
|
|
||||||
|
|
||||||
// By default, Xray write error log to stdout.
|
|
||||||
// "error": "/path/to/error/log/file",
|
|
||||||
|
|
||||||
// Log level, one of "debug", "info", "warning", "error", "none"
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
// List of inbound proxy configurations.
|
|
||||||
"inbounds": [{
|
|
||||||
// Port to listen on. You may need root access if the value is less than 1024.
|
|
||||||
"port": 1080,
|
|
||||||
|
|
||||||
// IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces.
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
|
|
||||||
// Tag of the inbound proxy. May be used for routing.
|
|
||||||
"tag": "socks-inbound",
|
|
||||||
|
|
||||||
// Protocol name of inbound proxy.
|
|
||||||
"protocol": "socks",
|
|
||||||
|
|
||||||
// Settings of the protocol. Varies based on protocol.
|
|
||||||
"settings": {
|
|
||||||
"auth": "noauth",
|
|
||||||
"udp": false,
|
|
||||||
"ip": "127.0.0.1"
|
|
||||||
},
|
|
||||||
|
|
||||||
// Enable sniffing on TCP connection.
|
|
||||||
"sniffing": {
|
|
||||||
"enabled": true,
|
|
||||||
// Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS.
|
|
||||||
"destOverride": ["http", "tls"]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
// List of outbound proxy configurations.
|
|
||||||
"outbounds": [{
|
|
||||||
// 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": "IPOnDemand",
|
|
||||||
"rules":[
|
|
||||||
{
|
|
||||||
// Blocks access to private IPs. Remove this if you want to access your router.
|
|
||||||
"type": "field",
|
|
||||||
"ip": ["geoip:private"],
|
|
||||||
"outboundTag": "blocked"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Blocks major ads.
|
|
||||||
"type": "field",
|
|
||||||
"domain": ["geosite:category-ads"],
|
|
||||||
"outboundTag": "blocked"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
// Dns settings for domain resolution.
|
|
||||||
"dns": {
|
|
||||||
// Static hosts, similar to hosts file.
|
|
||||||
"hosts": {
|
|
||||||
// Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com.
|
|
||||||
"domain:v2ray.com": "www.vicemc.net",
|
|
||||||
|
|
||||||
// The following settings help to eliminate DNS poisoning in mainland China.
|
|
||||||
// It is safe to comment these out if this is not the case for you.
|
|
||||||
"domain:github.io": "pages.github.com",
|
|
||||||
"domain:wikipedia.org": "www.wikimedia.org",
|
|
||||||
"domain:shadowsocks.org": "electronicsrealm.com"
|
|
||||||
},
|
|
||||||
"servers": [
|
|
||||||
"1.1.1.1",
|
|
||||||
{
|
|
||||||
"address": "114.114.114.114",
|
|
||||||
"port": 53,
|
|
||||||
// List of domains that use this DNS first.
|
|
||||||
"domains": [
|
|
||||||
"geosite:cn"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"8.8.8.8",
|
|
||||||
"localhost"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
// Policy controls some internal behavior of how Xray 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
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"system": {
|
|
||||||
"statsInboundUplink": false,
|
|
||||||
"statsInboundDownlink": false,
|
|
||||||
"statsOutboundUplink": false,
|
|
||||||
"statsOutboundDownlink": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 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 Xray instance.
|
|
||||||
//"api": {
|
|
||||||
//"tag": "api",
|
|
||||||
//"services": [
|
|
||||||
// "HandlerService",
|
|
||||||
// "LoggerService",
|
|
||||||
// "StatsService"
|
|
||||||
//]
|
|
||||||
//},
|
|
||||||
|
|
||||||
// You may add other entries to the configuration, but they will not be recognized by Xray.
|
|
||||||
"other": {}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"log": {
|
|
||||||
"loglevel": "warning"
|
|
||||||
},
|
|
||||||
"inbounds": [{
|
|
||||||
"port": 1080,
|
|
||||||
"listen": "127.0.0.1",
|
|
||||||
"protocol": "socks",
|
|
||||||
"settings": {
|
|
||||||
"auth": "noauth",
|
|
||||||
"udp": false,
|
|
||||||
"ip": "127.0.0.1"
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
"outbounds": [{
|
|
||||||
"protocol": "freedom",
|
|
||||||
"settings": {},
|
|
||||||
"tag": "direct"
|
|
||||||
}],
|
|
||||||
"policy": {
|
|
||||||
"levels": {
|
|
||||||
"0": {"uplinkOnly": 0}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"inbounds": [{
|
|
||||||
"port": 10086,
|
|
||||||
"protocol": "vmess",
|
|
||||||
"settings": {
|
|
||||||
"clients": [
|
|
||||||
{
|
|
||||||
"id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
|
|
||||||
"level": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
"outbounds": [{
|
|
||||||
"protocol": "freedom",
|
|
||||||
"settings": {}
|
|
||||||
},{
|
|
||||||
"protocol": "blackhole",
|
|
||||||
"settings": {},
|
|
||||||
"tag": "blocked"
|
|
||||||
}],
|
|
||||||
"routing": {
|
|
||||||
"rules": [
|
|
||||||
{
|
|
||||||
"type": "field",
|
|
||||||
"ip": ["geoip:private"],
|
|
||||||
"outboundTag": "blocked"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
config xray 'enabled'
|
|
||||||
option enabled '0'
|
|
||||||
|
|
||||||
config xray 'config'
|
|
||||||
option confdir '/etc/xray'
|
|
||||||
list conffiles '/etc/xray/config.json'
|
|
||||||
option datadir '/usr/share/v2ray'
|
|
||||||
option dialer ''
|
|
||||||
option format 'json'
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
|
|
||||||
USE_PROCD=1
|
|
||||||
START=99
|
|
||||||
|
|
||||||
CONF="xray"
|
|
||||||
PROG="/usr/bin/xray"
|
|
||||||
|
|
||||||
start_service() {
|
|
||||||
config_load "$CONF"
|
|
||||||
|
|
||||||
local enabled
|
|
||||||
config_get_bool enabled "enabled" "enabled" "0"
|
|
||||||
[ "$enabled" -eq "1" ] || return 1
|
|
||||||
|
|
||||||
local confdir
|
|
||||||
local conffiles
|
|
||||||
local datadir
|
|
||||||
local dialer
|
|
||||||
local format
|
|
||||||
|
|
||||||
config_get confdir "config" "confdir"
|
|
||||||
config_get conffiles "config" "conffiles"
|
|
||||||
config_get datadir "config" "datadir" "/usr/share/xray"
|
|
||||||
config_get dialer "config" "dialer"
|
|
||||||
config_get format "config" "format" "json"
|
|
||||||
|
|
||||||
procd_open_instance "$CONF"
|
|
||||||
procd_set_param command "$PROG" run
|
|
||||||
[ -n "$confdir" ] && procd_append_param command -confdir "$confdir"
|
|
||||||
[ -n "$conffiles" ] && {
|
|
||||||
for i in $conffiles
|
|
||||||
do
|
|
||||||
procd_append_param command -config "$i"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
[ -n "$format" ] && procd_append_param command -format "$format"
|
|
||||||
[ -n "$dialer" ] && procd_set_param env XRAY_BROWSER_DIALER="$dialer"
|
|
||||||
procd_set_param env XRAY_LOCATION_ASSET="$datadir"
|
|
||||||
procd_set_param file $conffiles
|
|
||||||
|
|
||||||
procd_set_param limits core="unlimited"
|
|
||||||
procd_set_param limits nofile="1000000 1000000"
|
|
||||||
procd_set_param stdout 1
|
|
||||||
procd_set_param stderr 1
|
|
||||||
procd_set_param respawn
|
|
||||||
|
|
||||||
procd_close_instance
|
|
||||||
}
|
|
||||||
|
|
||||||
reload_service() {
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
service_triggers() {
|
|
||||||
procd_add_reload_trigger "$CONF"
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
"xray-core")
|
|
||||||
xray version 2>&1 | grep "${2#*v}"
|
|
||||||
;;
|
|
||||||
esac
|
|
Loading…
Reference in New Issue
Block a user