xray-core: add example configs
Thry're from v2fly/v2ray-core wikis, used as examples. Signed-off-by: Tianling Shen <cnsztl@project-openwrt.eu.org>
This commit is contained in:
parent
87a5328dd4
commit
c8c2564012
3 changed files with 78 additions and 0 deletions
|
@ -40,10 +40,18 @@ define Package/xray-core
|
||||||
PROVIDES:=v2ray-core
|
PROVIDES:=v2ray-core
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/xray-example
|
||||||
|
$(call Package/xray/template)
|
||||||
|
TITLE+= (example configs)
|
||||||
|
DEPENDS:=xray-core
|
||||||
|
PKGARCH:=all
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/xray-geodata
|
define Package/xray-geodata
|
||||||
$(call Package/xray/template)
|
$(call Package/xray/template)
|
||||||
TITLE+= (geodata files)
|
TITLE+= (geodata files)
|
||||||
DEPENDS:=xray-core
|
DEPENDS:=xray-core
|
||||||
|
PKGARCH:=all
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/xray/description
|
define Package/xray/description
|
||||||
|
@ -55,6 +63,12 @@ define Package/xray-core/description
|
||||||
$(call Package/xray/description)
|
$(call Package/xray/description)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/xray-example/description
|
||||||
|
$(call Package/xray/description)
|
||||||
|
|
||||||
|
This includes example configuration files for xray-core.
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/xray-geodata/description
|
define Package/xray-geodata/description
|
||||||
$(call Package/xray/description)
|
$(call Package/xray/description)
|
||||||
|
|
||||||
|
@ -97,6 +111,12 @@ define Package/xray-core/install
|
||||||
$(LN) xray $(1)/usr/bin/v2ray
|
$(LN) xray $(1)/usr/bin/v2ray
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/xray-example/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/xray/
|
||||||
|
$(INSTALL_CONF) $(CURDIR)/files/vpoint_socks_vmess.json $(1)/etc/xray/
|
||||||
|
$(INSTALL_CONF) $(CURDIR)/files/vpoint_vmess_freedom.json $(1)/etc/xray/
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/xray-geodata/install
|
define Package/xray-geodata/install
|
||||||
$(INSTALL_DIR) $(1)/usr/share/xray/
|
$(INSTALL_DIR) $(1)/usr/share/xray/
|
||||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/xray/geoip.dat
|
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/xray/geoip.dat
|
||||||
|
@ -104,4 +124,5 @@ define Package/xray-geodata/install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,xray-core))
|
$(eval $(call BuildPackage,xray-core))
|
||||||
|
$(eval $(call BuildPackage,xray-example))
|
||||||
$(eval $(call BuildPackage,xray-geodata))
|
$(eval $(call BuildPackage,xray-geodata))
|
||||||
|
|
25
net/xray-core/files/vpoint_socks_vmess.json
Normal file
25
net/xray-core/files/vpoint_socks_vmess.json
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"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}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
32
net/xray-core/files/vpoint_vmess_freedom.json
Normal file
32
net/xray-core/files/vpoint_vmess_freedom.json
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"inbounds": [{
|
||||||
|
"port": 10086,
|
||||||
|
"protocol": "vmess",
|
||||||
|
"settings": {
|
||||||
|
"clients": [
|
||||||
|
{
|
||||||
|
"id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
|
||||||
|
"level": 1,
|
||||||
|
"alterId": 64
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"outbounds": [{
|
||||||
|
"protocol": "freedom",
|
||||||
|
"settings": {}
|
||||||
|
},{
|
||||||
|
"protocol": "blackhole",
|
||||||
|
"settings": {},
|
||||||
|
"tag": "blocked"
|
||||||
|
}],
|
||||||
|
"routing": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"type": "field",
|
||||||
|
"ip": ["geoip:private"],
|
||||||
|
"outboundTag": "blocked"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue