mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-05 22:36:13 +08:00
update 2023-01-31 00:20:30
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=adguardhome
|
||||
PKG_VERSION:=0.107.21
|
||||
PKG_VERSION:=0.108.0-b.25
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
|
||||
PKG_MIRROR_HASH:=b7a5e666471f44e405088c5719c6bd030058a80ede1832c246cd70c10dc3993e
|
||||
PKG_HASH:=7a9739189ce6f821b6639fa9f484e492e43805d933b140c195fa3dcbc859dea5
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsproxy
|
||||
PKG_VERSION:=0.46.5
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/AdguardTeam/dnsproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=604b7e78956ec6d6421807e30ff44d87d85f10203b3d68d397af34ca2013e696
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/AdguardTeam/dnsproxy
|
||||
GO_PKG_LDFLAGS_X:=main.VersionString=v$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/dnsproxy
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=IP Addresses and Names
|
||||
TITLE:=Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
|
||||
URL:=https://github.com/AdguardTeam/dnsproxy
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
USERID:=dnsproxy=411:dnsproxy=411
|
||||
endef
|
||||
|
||||
define Package/dnsproxy/description
|
||||
A simple DNS proxy server that supports all existing DNS protocols including
|
||||
DNS-over-TLS, DNS-over-HTTPS, DNSCrypt, and DNS-over-QUIC.Moreover, it can
|
||||
work as a DNS-over-HTTPS, DNS-over-TLS or DNS-over-QUIC server.
|
||||
endef
|
||||
|
||||
define Package/dnsproxy/install
|
||||
$(call GoPackage/Package/Install/Bin,$(1))
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) $(CURDIR)/files/dnsproxy.config $(1)/etc/config/dnsproxy
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/dnsproxy.init $(1)/etc/init.d/dnsproxy
|
||||
endef
|
||||
|
||||
define Package/dnsproxy/conffiles
|
||||
/etc/config/dnsproxy
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,dnsproxy))
|
||||
$(eval $(call BuildPackage,dnsproxy))
|
||||
@@ -1,41 +0,0 @@
|
||||
|
||||
# For documents, please see https://github.com/AdguardTeam/dnsproxy#usage
|
||||
|
||||
config dnsproxy 'global'
|
||||
option enabled '0'
|
||||
option listen_addr '127.0.0.1'
|
||||
option listen_port '5353'
|
||||
option log_file ''
|
||||
option all_servers '0'
|
||||
option fastest_addr '0'
|
||||
option insecure '0'
|
||||
option ipv6_disabled '0'
|
||||
option max_go_routines ''
|
||||
option rate_limit ''
|
||||
option refuse_any '0'
|
||||
option udp_buf_size ''
|
||||
option verbose '0'
|
||||
|
||||
config dnsproxy 'bogus_nxdomain'
|
||||
list ip_addr ''
|
||||
|
||||
config dnsproxy 'cache'
|
||||
option enabled '0'
|
||||
option cache_optimistic '0'
|
||||
option size '65535'
|
||||
option min_ttl ''
|
||||
option max_ttl ''
|
||||
|
||||
config dnsproxy 'dns64'
|
||||
option enabled '0'
|
||||
option dns64_prefix '64:ff9b::'
|
||||
|
||||
config dnsproxy 'edns'
|
||||
option enabled '0'
|
||||
option edns_addr ''
|
||||
|
||||
config dnsproxy 'servers'
|
||||
list bootstrap 'tls://8.8.8.8'
|
||||
list fallback 'tls://9.9.9.9'
|
||||
list upstream 'tls://1.1.1.1'
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2021 Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
USE_PROCD=1
|
||||
START=90
|
||||
|
||||
CONF="dnsproxy"
|
||||
PROG="/usr/bin/dnsproxy"
|
||||
|
||||
is_enabled() {
|
||||
local enabled
|
||||
config_get enabled "$1" "$2" "0"
|
||||
if [ "$enabled" -eq "1" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_empty() {
|
||||
local empty
|
||||
config_get empty "$1" "$2" $3
|
||||
if [ -z "$empty" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
append_param() {
|
||||
procd_append_param command "$1" $2
|
||||
}
|
||||
|
||||
append_param_arg() {
|
||||
local value
|
||||
config_get value "$1" "$2" $4
|
||||
[ -n "$value" ] && append_param "$3" "$value"
|
||||
}
|
||||
|
||||
append_param_bool() {
|
||||
is_enabled "$1" "$2" && append_param "--${2//_/-}"
|
||||
}
|
||||
|
||||
load_config_arg() {
|
||||
append_param_bool "$1" "all_servers"
|
||||
append_param_bool "$1" "fastest_addr"
|
||||
append_param_bool "$1" "insecure"
|
||||
append_param_bool "$1" "ipv6_disabled"
|
||||
append_param_bool "$1" "refuse_any"
|
||||
append_param_bool "$1" "verbose"
|
||||
}
|
||||
|
||||
load_config_list() {
|
||||
is_empty "bogus_nxdomain" "ip_addr" || config_list_foreach "bogus_nxdomain" "ip_addr" "append_param '--bogus-nxdomain'"
|
||||
|
||||
for i in "bootstrap" "fallback" "upstream"; do
|
||||
is_empty "servers" "$i" || config_list_foreach "servers" "$i" "append_param '--$i'"
|
||||
done
|
||||
}
|
||||
|
||||
load_config_param() {
|
||||
append_param_arg "global" "listen_addr" "--listen" "127.0.0.1"
|
||||
append_param_arg "global" "listen_port" "--port" "5353"
|
||||
append_param_arg "global" "log_file" "--output"
|
||||
append_param_arg "global" "max_go_routines" "--max-go-routines"
|
||||
append_param_arg "global" "rate_limit" "--ratelimit"
|
||||
append_param_arg "global" "udp_buf_size" "--udp-buf-size"
|
||||
|
||||
is_enabled "cache" "enabled" && {
|
||||
append_param "--cache"
|
||||
append_param_bool "cache" "cache_optimistic"
|
||||
append_param_arg "cache" "size" "--cache-size"
|
||||
append_param_arg "cache" "min_ttl" "--cache-min-ttl"
|
||||
append_param_arg "cache" "max_ttl" "--cache-max-ttl"
|
||||
}
|
||||
|
||||
is_enabled "dns64" "enabled" && {
|
||||
append_param "--dns64"
|
||||
append_param_arg "dns64" "dns64_prefix" "--dns64-prefix"
|
||||
}
|
||||
|
||||
is_enabled "edns" "enabled" && {
|
||||
append_param "--edns"
|
||||
append_param_arg "edns" "edns_addr" "--edns-addr"
|
||||
}
|
||||
}
|
||||
|
||||
start_service() {
|
||||
config_load "$CONF"
|
||||
|
||||
is_enabled "global" "enabled" || return 1
|
||||
|
||||
procd_open_instance "$CONF"
|
||||
procd_set_param command "$PROG"
|
||||
|
||||
load_config_arg "global"
|
||||
load_config_list
|
||||
load_config_param
|
||||
|
||||
procd_set_param respawn
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param user dnsproxy
|
||||
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "$CONF"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
dnsproxy --version | grep "$PKG_VERSION"
|
||||
@@ -9,9 +9,9 @@ PKG_VERSION:=2.21.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=b73d278
|
||||
PKG_VERSION:=2.23.0
|
||||
PKG_SOURCE_URL:=https://github.com/filebrowser/filebrowser
|
||||
PKG_MIRROR_HASH:=66b9df31f98bec22715a7fe9ca73962c1e5a5c1b3bcfb99fd0ac1703118ee4c8
|
||||
PKG_HASH:=9a99f0c51114ff7e3df89190729a8ca1c0ed48c491a5c6f9d9e266eb6657898d
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gost
|
||||
PKG_VERSION:=2.11.4
|
||||
PKG_VERSION:=2.11.5
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ginuerzh/gost/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=aa3211282fce695584795fac20da77a2ac68d3e08602118afb0747bd64c1eac4
|
||||
PKG_HASH:=dab48b785f4d2df6c2f5619a4b9a2ac6e8b708f667a4d89c7d08df67ad7c5ca7
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
### 访问数:[] [](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
||||
欢迎来到sirpdboy的源码仓库!
|
||||
=
|
||||
# Lucky(大吉)
|
||||
|
||||
luci-app-lucky 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
|
||||
|
||||
[](#解决-github-网页上图片显示失败的问题) [](https://t.me/joinchat/AAAAAEpRF88NfOK5vBXGBQ)
|
||||
|
||||
[luci-app-lucky Lucky(大吉)](https://github.com/sirpdboy/luci-app-lucky)
|
||||
======================
|
||||
|
||||
|
||||
请 **认真阅读完毕** 本页面,本页面包含注意事项和如何使用。
|
||||
|
||||
## 功能说明:
|
||||
|
||||
### Lucky(大吉)
|
||||
|
||||
#### 动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理
|
||||
|
||||
#### 在LUCI中可以配置访问端口和增加是否允许外网访问设置。
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [lucky](#lucky)
|
||||
- [特性](#特性)
|
||||
- [使用方法](#使用方法)
|
||||
- [说明](#说明)
|
||||
- [问题](#常见问题)
|
||||
- [界面](#界面)
|
||||
- [捐助](#捐助)
|
||||
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## 特性
|
||||
|
||||
- 目前已经实现的功能有
|
||||
- 1.替代socat,主要用于公网IPv6 tcp/udp转 内网ipv4
|
||||
- 支持界面化(web后台)管理转发规则,单条转发规则支持设置多个转发端口,一键开关指定转发规则
|
||||
- 单条规则支持黑白名单安全模式切换,白名单模式可以让没有安全验证的内网服务端口稍微安全一丢丢暴露到公网
|
||||
- Web后台支持查看最新100条日志
|
||||
- 另有精简版不带后台,支持命令行快捷设置转发规则,有利于空间有限的嵌入式设备运行.(不再提供编译版本,如有需求可以自己编译)
|
||||
- 2.动态域名服务
|
||||
- 参考和部分代码来自 https://github.com/jeessy2/ddns-go
|
||||
- 在ddns-go的基础上主要改进/增加的功能有
|
||||
- 1.同时支持接入多个不同的DNS服务商
|
||||
- 2.支持http/https/socks5代理设置
|
||||
- 3.自定义(Callback)和Webhook支持自定义headers
|
||||
- 4.支持BasicAuth
|
||||
- 5.DDNS任务列表即可了解全部信息(包含错误信息),无需单独查看日志.
|
||||
- 6.调用DNS服务商接口更新域名信息前可以先通过DNS解析域名比较IP,减少对服务商接口调用.
|
||||
- 其它细节功能自己慢慢发现...
|
||||
- 没有文档,后台各处的提示信息已经足够多.
|
||||
- 支持的DNS服务商和DDNS-GO一样,有Alidns(阿里云),百度云,Cloudflare,Dnspod(腾讯云),华为云.自定义(Callback)内置有每步,No-IP,Dynv6,Dynu模版,一键填充,仅需修改相应用户密码或者token即可快速接入.
|
||||
- 3.http/https反向代理
|
||||
- 特点
|
||||
- 设置简单
|
||||
- 支持HttpBasic认证
|
||||
- 支持IP黑白名单
|
||||
- 支持UserAgent黑白名单
|
||||
- 日志记录最近访问情况
|
||||
- 一键开关子规则
|
||||
- 前端域名与后端地址 支持一对一,一对多(均衡负载),多对多(下一级反向代理)
|
||||
- 4.网络唤醒
|
||||
- 特点
|
||||
- 支持远程控制唤醒和关机操作
|
||||
- 远程唤醒需要 待唤醒端所在局域网内有开启中继唤醒指令的lucky唤醒客户端
|
||||
- 远程关机需要 待关机端运行有luck唤醒客户端
|
||||
- 支持接入第三方物联网平台(点灯科技 巴法云),可通过各大平台的语音助手控制设备唤醒和关机.
|
||||
- 点灯科技支持 小爱同学 小度 天猫精灵
|
||||
- 巴法云支持小爱同学 小度 天猫精灵 google语音 AmazonAlexa
|
||||
- 具备但一般用不上的功能:支持一个设备设置多组网卡mac和多个广播地址,实现批量控制设备.
|
||||
|
||||
## 使用方法
|
||||
|
||||
- 将luci-app-lucky添加至 LEDE/OpenWRT 源码的方法。
|
||||
|
||||
### 下载源码方法:
|
||||
|
||||
```Brach
|
||||
|
||||
# 下载源码
|
||||
|
||||
git clone https://github.com/sirpdboy/luci-app-lucky.git package/lucky
|
||||
make menuconfig
|
||||
|
||||
```
|
||||
### 配置菜单
|
||||
|
||||
```Brach
|
||||
make menuconfig
|
||||
# 找到 LuCI -> Applications, 选择 luci-app-lucky, 保存后退出。
|
||||
```
|
||||
|
||||
### 编译
|
||||
|
||||
```Brach
|
||||
# 编译固件
|
||||
make package/lucky/luci-app-lucky/compile V=s
|
||||
```
|
||||
|
||||
## 说明
|
||||
|
||||
- 源码来源:https://github.com/gdy666/lucky
|
||||
- 源码来源:https://github.com/sirpdboy/luci-app-lucky
|
||||
- 你可以随意使用其中的源码,但请注明出处。
|
||||
|
||||
## 常见问题
|
||||
|
||||
- 不同于防火墙端口转发规则,不要设置没有用上的端口,会增加内存的使用.
|
||||
- 小米路由 ipv4 类型的80和443端口被占用,但只设置监听tcp6(ipv6)的80/443端口转发规则完全没问题.
|
||||
- 如果需要使用白名单模式,请根据自身需求打开外网访问后台管理页面开关.
|
||||
- 转发规则启用异常,端口转发没有生效时请登录后台查看日志.
|
||||
- 开启外网访问可以直接修改配置文件中的"AllowInternetaccess": false, 将false改为true
|
||||
|
||||
|
||||
## 界面
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
# My other project
|
||||
|
||||
网络速度测试 :https://github.com/sirpdboy/NetSpeedTest
|
||||
|
||||
定时设置插件 : https://github.com/sirpdboy/luci-app-autotimeset
|
||||
|
||||
关机功能插件 : https://github.com/sirpdboy/luci-app-poweroffdevice
|
||||
|
||||
opentopd主题 : https://github.com/sirpdboy/luci-theme-opentopd
|
||||
|
||||
opentoks 主题: https://github.com/sirpdboy/luci-theme-opentoks [仿KOOLSAHRE主题]
|
||||
|
||||
btmob 主题: https://github.com/sirpdboy/luci-theme-btmob
|
||||
|
||||
系统高级设置 : https://github.com/sirpdboy/luci-app-advanced
|
||||
|
||||
DDNS-GO动态域名: https://github.com/sirpdboy/luci-app-DDNS-GO
|
||||
|
||||
Lucky(大吉): https://github.com/sirpdboy/luci-app-lucky
|
||||
|
||||
|
||||
## 捐助
|
||||
|
||||
-如果你觉得此项目对你有帮助,请捐助我们,以使项目能持续发展,更加完善。··请作者喝杯咖啡~~~**
|
||||
-你们的支持就是我的动力!**
|
||||
|
||||
| <img src="https://img.shields.io/badge/-支付宝-F5F5F5.svg" href="#赞助支持本项目-" height="25" alt="图飞了😂"/> | <img src="https://img.shields.io/badge/-微信-F5F5F5.svg" height="25" alt="图飞了😂" href="#赞助支持本项目-"/> |
|
||||
| :-----------------: | :-------------: |
|
||||
| |  |
|
||||
|
||||
<a href="#readme">
|
||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="图飞了😂" title="返回顶部" align="right"/>
|
||||
</a>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-lucky
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_RELEASE:=5
|
||||
|
||||
LUCI_TITLE:=LuCI Support for Dynamic lucky Client
|
||||
LUCI_DEPENDS:=+lucky
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
@@ -1,32 +0,0 @@
|
||||
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
-- Licensed to the public under the Apache License 2.0.
|
||||
|
||||
module("luci.controller.lucky", package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
entry({"admin", "services", "lucky"}, alias("admin", "services", "lucky", "setting"),_("Lucky"), 57).dependent = true
|
||||
entry({"admin", "services", "lucky", "setting"}, cbi("lucky"), _("Base Setting"), 20).leaf=true
|
||||
entry({"admin", "services", "lucky", "lucky"}, template("lucky"), _("Lucky"), 30).leaf = true
|
||||
entry({"admin", "services", "lucky", "lucky_admin"}, call("lucky_admin")).leaf = true
|
||||
entry({"admin", "services", "lucky_status"}, call("act_status"))
|
||||
end
|
||||
|
||||
function act_status()
|
||||
local uci = require 'luci.model.uci'.cursor()
|
||||
local port = tonumber(uci:get_first("lucky", "lucky", "port"))
|
||||
local e = { }
|
||||
e.running = luci.sys.call("pidof lucky >/dev/null") == 0
|
||||
e.port = (port or 16601)
|
||||
e.safeurl = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
|
||||
function lucky_admin()
|
||||
local e = { }
|
||||
e.username = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminAccount | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
|
||||
e.password = luci.sys.exec("cat /etc/lucky/lucky.conf | grep AdminPassword | sed -e 's/,//g' -e 's/\"//g' | awk -F ':' '{print $2}' ")
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json(e)
|
||||
end
|
||||
@@ -1,34 +0,0 @@
|
||||
-- Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
|
||||
local m, s ,o
|
||||
|
||||
m = Map("lucky")
|
||||
m.title = translate("Lucky")
|
||||
m.description = translate("Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp")..translate("</br>For specific usage, see:")..translate("<a href=\'https://github.com/sirpdboy/luci-app-lucky.git' target=\'_blank\'>GitHub @sirpdboy/luci-app-lucky </a>。")
|
||||
|
||||
m:section(SimpleSection).template = "lucky_status"
|
||||
|
||||
s = m:section(TypedSection, "lucky", translate("Global Settings"))
|
||||
s.addremove=false
|
||||
s.anonymous=true
|
||||
|
||||
o = s:option(Flag,"enabled",translate("Enable"))
|
||||
o.default=0
|
||||
|
||||
o = s:option(Value, "port",translate("Set the Lucky access port"))
|
||||
o.datatype = "uinteger"
|
||||
o.default = 16601
|
||||
|
||||
o = s:option(Flag, "AllowInternetaccess", translate("Enable Internet access"))
|
||||
o.default=0
|
||||
|
||||
o = s:option(Button, "lucky_admin", translate("View Password"))
|
||||
o.rawhtml = true
|
||||
o.template = "lucky_admin"
|
||||
|
||||
m.apply_on_parse = true
|
||||
m.on_after_apply = function(self,map)
|
||||
luci.sys.exec("/etc/init.d/lucky restart")
|
||||
end
|
||||
|
||||
return m
|
||||
@@ -1,37 +0,0 @@
|
||||
<%#
|
||||
Copyright 2021-2022 sirpdboy Wich <herboy2008@gmail.com>
|
||||
https://github.com/sirpdboy/luci-app-lucky
|
||||
Licensed to the public under the Apache License 2.0.
|
||||
-%>
|
||||
|
||||
<%
|
||||
local safeURL = luci.sys.exec("cat /etc/lucky/lucky.conf | grep SafeURL | sed -e 's/,//g' -e 's/\"//g' -e 's/\ //g' | awk -F ':' '{print $2}' ")
|
||||
local luckyHttpPort = luci.model.uci.cursor():get("lucky", "lucky", "port");
|
||||
-%>
|
||||
|
||||
<%+header%>
|
||||
<div class="cbi-map">
|
||||
|
||||
<iframe id="lucky" style="width: 100%; min-height: 780px; border: none; border-radius: .375rem;box-shadow: rgba(0, 0, 0, 0.75) 0px 0px 15px -5px;"><br/><em style=\"color:red\">
|
||||
<p ><em><%:The Lucky service is not running.%></em></p>
|
||||
</iframe>
|
||||
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ `<%=luckyHttpPort%>`+`<%=safeURL%>`;
|
||||
|
||||
document.getElementById("lucky").src = luckyAdminURL
|
||||
document.getElementById("lucky").height = document.documentElement.clientHeight;
|
||||
window.onresize = function(){
|
||||
document.getElementById("lucky").height = document.documentElement.clientHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<%+footer%>
|
||||
@@ -1,26 +0,0 @@
|
||||
<%+cbi/valueheader%>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
function admin_info(btn)
|
||||
{
|
||||
btn.disabled = true;
|
||||
btn.value = '<%:Reading...%>';
|
||||
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "lucky", "lucky_admin")%>',
|
||||
null,
|
||||
function(x,d)
|
||||
{
|
||||
var tb = document.getElementById('<%=self.option%>-status');
|
||||
if (tb)
|
||||
{
|
||||
tb.innerHTML = "<%:Username:%>" + "<font color='green'>" + d.username + "</font>";
|
||||
tb.innerHTML += "<%:Password:%>" + "<font color='green'>" + d.password + "</font>";
|
||||
}
|
||||
btn.disabled = false;
|
||||
btn.value = '<%:Read%>';
|
||||
}
|
||||
);
|
||||
return false;
|
||||
}
|
||||
//]]></script>
|
||||
<input type="button" class="btn cbi-button cbi-button-apply" value="<%:Read%>" onclick="return admin_info(this)" />
|
||||
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
|
||||
<%+cbi/valuefooter%>
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
|
||||
|
||||
XHR.poll(3, '<%=url([[admin]], [[services]], [[lucky_status]])%>', null,
|
||||
function(x, d) {
|
||||
var tb = document.getElementById('lucky_status');
|
||||
if (d && tb)
|
||||
{
|
||||
if (d.running)
|
||||
{
|
||||
var luckyAdminURL = ""+ window.location.protocol + "//" + window.location.hostname +":"+ d.port+d.safeurl+"";
|
||||
tb.innerHTML = '<em><b style=\"color:green\"><%:The Lucky service is running.%></b></em>';
|
||||
tb.innerHTML +='<em> <br/><br/>' + ' <b > <%:Click the new page to open Lucky%> <a href="' +luckyAdminURL+'"'+' target="_blank">' + luckyAdminURL + ' </a><br/> </em>';
|
||||
}
|
||||
else
|
||||
{
|
||||
tb.innerHTML = '<em><b style=\"color:red\"><%:The Lucky service is not running.%></b></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
|
||||
<fieldset class="cbi-section">
|
||||
<legend><%:Lucky Status%></legend>
|
||||
<p id="lucky_status">
|
||||
<em><%:Collecting data...%></em>
|
||||
</p>
|
||||
</fieldset>
|
||||
@@ -1,56 +0,0 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
msgid "Lucky"
|
||||
msgstr "Lucky大吉"
|
||||
|
||||
msgid "Main functions of Lucky: dynamic domain name ddns-go service, which replaces socat. It is mainly used for public IPv6 tcp/udp to intranet ipv4, http/https reverse proxy frp"
|
||||
msgstr "大吉主要功能:动态域名ddns-go服务,替代socat主要用于公网IPv6 tcp/udp转内网ipv4,http/https反向代理,网络唤醒(可通过第三方物联网平台接入各大语音助手实现语音控制开关电脑)"
|
||||
|
||||
msgid "Running state"
|
||||
msgstr "运行状态"
|
||||
|
||||
msgid "The Lucky service is running."
|
||||
msgstr "大吉服务已启动"
|
||||
|
||||
msgid "The Lucky service is not running."
|
||||
msgstr "大吉服务未启动"
|
||||
|
||||
msgid "Lucky Status"
|
||||
msgstr "大吉服务状态"
|
||||
|
||||
msgid "Collecting data..."
|
||||
msgstr "收集数据..."
|
||||
|
||||
msgid "Set the Lucky access port"
|
||||
msgstr "设置访问端口"
|
||||
|
||||
msgid "Lucky configuration file"
|
||||
msgstr "Lucky 配置文件"
|
||||
|
||||
msgid "</br>For specific usage, see:"
|
||||
msgstr "</br>具体使用方法参见:"
|
||||
|
||||
msgid "Base Setting"
|
||||
msgstr "基本设置"
|
||||
|
||||
msgid "Enable Internet access"
|
||||
msgstr "开启外网访问"
|
||||
|
||||
msgid "Click the new page to open Lucky"
|
||||
msgstr "点击新页面打开大吉"
|
||||
|
||||
msgid "View Password"
|
||||
msgstr "查看密码"
|
||||
|
||||
msgid "Username:"
|
||||
msgstr "用户名:"
|
||||
|
||||
msgid "Password:"
|
||||
msgstr "密码:"
|
||||
|
||||
msgid "Reading..."
|
||||
msgstr "读取中..."
|
||||
|
||||
msgid "Read"
|
||||
msgstr "读取"
|
||||
@@ -1 +0,0 @@
|
||||
zh-cn
|
||||
@@ -1,5 +0,0 @@
|
||||
config lucky 'lucky'
|
||||
option enabled '0'
|
||||
option logger '1'
|
||||
option port '16601'
|
||||
option AllowInternetaccess '0'
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#
|
||||
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com> https://github.com/sirpdboy/luci-app-lucky
|
||||
|
||||
# This file is part of lucky .
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
STOP=10
|
||||
|
||||
CONF="lucky"
|
||||
PROG=/usr/bin/lucky
|
||||
LUCKYDIR=/etc/lucky
|
||||
LUCKYCONF=/etc/lucky/lucky.conf
|
||||
|
||||
get_config() {
|
||||
config_get_bool enabled $1 enabled 1
|
||||
config_get_bool logger $1 logger 1
|
||||
config_get port $1 port 16601
|
||||
config_get AllowInternetaccess $1 AllowInternetaccess 0
|
||||
}
|
||||
|
||||
lucky_prepare() {
|
||||
pgrep -f $PROG | xargs kill -9 >/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
start_service() {
|
||||
stop_service
|
||||
config_load "$CONF"
|
||||
config_foreach get_config "$CONF"
|
||||
|
||||
[ "x$enabled" = "x1" ] || return 1
|
||||
if [ "x$AllowInternetaccess" = "x1" ] ;then
|
||||
sed -i 's/"AllowInternetaccess": false,/"AllowInternetaccess": true,/g' "$LUCKYCONF"
|
||||
else
|
||||
sed -i 's/"AllowInternetaccess": true,/"AllowInternetaccess": false,/g' "$LUCKYCONF"
|
||||
fi
|
||||
# set_firewall
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_append_param command -c "$LUCKYCONF" -p $port
|
||||
[ "x$logger" == x1 ] && procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
lucky_prepare
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "$CONF"
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
{
|
||||
"BaseConfigure": {
|
||||
"AdminWebListenPort": 16601,
|
||||
"AdminWebListenTLS": false,
|
||||
"AdminWebListenHttpsPort": 16626,
|
||||
"AdminAccount": "666",
|
||||
"AdminPassword": "666",
|
||||
"AllowInternetaccess": false,
|
||||
"LogMaxSize": 2048,
|
||||
"HttpClientTimeout": 20,
|
||||
"InsecureSkipVerify": false,
|
||||
"DisableModules": null,
|
||||
"SafeURL": ""
|
||||
},
|
||||
"WhiteListConfigure": {
|
||||
"BaseConfigure": {
|
||||
"URL": "",
|
||||
"ActivelifeDuration": 36,
|
||||
"BasicAccount": "666",
|
||||
"BasicPassword": "666"
|
||||
},
|
||||
"WhiteList": null
|
||||
},
|
||||
"BlackListConfigure": {
|
||||
"BlackList": null
|
||||
},
|
||||
"DDNSConfigure": {
|
||||
"Enable": false,
|
||||
"FirstCheckDelay": 0,
|
||||
"Intervals": 0
|
||||
},
|
||||
"DDNSTaskList": null,
|
||||
"ReverseProxyRuleList": null,
|
||||
"SSLCertficateList": null,
|
||||
"PortForwardsRuleList": null,
|
||||
"PortForwardsConfigure": {
|
||||
"PortForwardsLimit": 128,
|
||||
"TCPPortforwardMaxConnections": 1024,
|
||||
"UDPReadTargetDataMaxgoroutineCount": 1024
|
||||
},
|
||||
"WOLDeviceList": null,
|
||||
"WOLServiceConfigure": {
|
||||
"Server": {
|
||||
"Enable": false,
|
||||
"Token": "666666"
|
||||
},
|
||||
"Client": {
|
||||
"Enable": false,
|
||||
"ServerURL": "",
|
||||
"Token": "",
|
||||
"Relay": false,
|
||||
"Key": "",
|
||||
"DeviceName": "",
|
||||
"Mac": "",
|
||||
"BroadcastIP": "",
|
||||
"Port": 9,
|
||||
"Repeat": 5,
|
||||
"PowerOffCMD": "",
|
||||
"UpdateTime": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
delete ucitrack.@lucky[-1]
|
||||
add ucitrack lucky
|
||||
set ucitrack.@lucky[-1].init=lucky
|
||||
commit ucitrack
|
||||
EOF
|
||||
|
||||
rm -rf /tmp/luci*
|
||||
exit 0
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"luci-app-lucky": {
|
||||
"description": "Grant UCI access for luci-app-lucky",
|
||||
"read": {
|
||||
"uci": [ "lucky" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "lucky" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021-2022 sirpdboy <herboy2008@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lucky
|
||||
PKG_VERSION:=1.7.17
|
||||
PKG_RELEASE:=1
|
||||
PKGARCH:=all
|
||||
|
||||
ifeq ($(ARCH),mipsel)
|
||||
LUCKY_ARCH:=mipsle_softfloat
|
||||
endif
|
||||
ifeq ($(ARCH),mips)
|
||||
LUCKY_ARCH:=mips_softfloat
|
||||
endif
|
||||
ifeq ($(ARCH),i386)
|
||||
LUCKY_ARCH:=i386
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
LUCKY_ARCH:=x86_64
|
||||
endif
|
||||
ifeq ($(ARCH),arm)
|
||||
LUCKY_ARCH:=armv7
|
||||
endif
|
||||
ifeq ($(BOARD),bcm53xx)
|
||||
LUCKY_ARCH:=armv6
|
||||
ifeq ($(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))),)
|
||||
LUCKY_ARCH:=armv5
|
||||
endif
|
||||
endif
|
||||
ifeq ($(BOARD),kirkwood)
|
||||
LUCKY_ARCH:=armv5
|
||||
endif
|
||||
ifeq ($(ARCH),aarch64)
|
||||
LUCKY_ARCH:=arm64
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=GDY666 <gdy666@foxmail.com>
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Lucky dynamic domain name ddns-go service, socat,frp
|
||||
DEPENDS:=@(i386||x86_64||arm||aarch64||mipsel||mips)
|
||||
URL:=https://github.com/gdy666/lucky
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Main functions of Lucky: dynamic domain name ddns-go service, socat,reverse proxy ,wake on lan
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
[ ! -f $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz ] && wget https://github.com/gdy666/lucky/releases/download/v$(PKG_VERSION)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -O $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz
|
||||
tar -xzvf $(PKG_BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)_Linux_$(LUCKY_ARCH).tar.gz -C $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lucky $(1)/usr/bin/lucky
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
@@ -1,43 +1,43 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=microsocks
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=microsocks
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/rofl0r/microsocks/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=6801559b6f8e17240ed8eef17a36eea8643412b5a7476980fd4e24b02a021b82
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=lean
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/microsocks
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Tiny, portable SOCKS5 server
|
||||
URL:=https://github.com/rofl0r/microsocks
|
||||
DEPENDS:=+libpthread
|
||||
endef
|
||||
|
||||
define Package/microsocks/description
|
||||
A SOCKS5 service that you can run on your remote boxes to tunnel connections
|
||||
through them, if for some reason SSH doesn't cut it for you.
|
||||
endef
|
||||
|
||||
define Package/microsocks/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/microsocks $(1)/usr/bin/microsocks
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,microsocks))
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_MAINTAINER:=lean
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/microsocks
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Tiny, portable SOCKS5 server
|
||||
URL:=https://github.com/rofl0r/microsocks
|
||||
DEPENDS:=+libpthread
|
||||
endef
|
||||
|
||||
define Package/microsocks/description
|
||||
A SOCKS5 service that you can run on your remote boxes to tunnel connections
|
||||
through them, if for some reason SSH doesn't cut it for you.
|
||||
endef
|
||||
|
||||
define Package/microsocks/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/microsocks $(1)/usr/bin/microsocks
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,microsocks))
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mosdns
|
||||
PKG_VERSION:=f130472
|
||||
PKG_VERSION:=5.0.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=mosdns-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/IrineSistiana/mosdns/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=skip
|
||||
PKG_HASH:=036007a5e38f1853203c038f34c966a8cc3cb05d06624e73c4bf705938989b56
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
|
||||
@@ -1,127 +1,128 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=109.0.5414.74-2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=3c1e9e276e4ae79c8192c25a15df2f564741602ae403712565c48aa6db9d78e7
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),)
|
||||
PKG_BUILD_DEPENDS+= ninja/host
|
||||
endif
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
ifneq ($(CONFIG_CPU_TYPE)," ")
|
||||
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
|
||||
CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE)))
|
||||
ifeq ($(CPU_SUBTYPE),)
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
else
|
||||
CPU_TYPE:=""
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/naiveproxy
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Make a fortune quietly
|
||||
URL:=https://github.com/klzgrad/naiveproxy
|
||||
DEPENDS:=@!(arc||armeb||mips||mips64||powerpc||TARGET_gemini) +libatomic
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/description
|
||||
NaïveProxy uses Chrome's network stack to camouflage traffic with strong
|
||||
censorship resistance and low detectability. Reusing Chrome's stack also
|
||||
ensures best practices in performance and security.
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
|
||||
export CCACHE_CPP2=yes
|
||||
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
|
||||
endif
|
||||
|
||||
CLANG_VER:=16-init-8697-g60809cd2-1
|
||||
CLANG_FILE:=clang-llvmorg-$(CLANG_VER).tgz
|
||||
define Download/CLANG
|
||||
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
|
||||
URL_FILE:=$(CLANG_FILE)
|
||||
FILE:=$(CLANG_FILE)
|
||||
HASH:=5ae35f85e0d32136795c6b223bf64263d46678dd4a24fea4e9039e58a32670de
|
||||
endef
|
||||
|
||||
GN_VER:=1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41
|
||||
GN_FILE:=gn-git_revision-$(GN_VER).zip
|
||||
define Download/GN_TOOL
|
||||
URL:=https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+
|
||||
URL_FILE:=git_revision:$(GN_VER)
|
||||
FILE:=$(GN_FILE)
|
||||
HASH:=7195291488d08f3a10e85b85d8c4816e077015f1c5f196f770003a97aa42caf8
|
||||
endef
|
||||
|
||||
PGO_VER:=5414-1672766927-26b17aa1745606599e619feccfe46371e879e7c4
|
||||
PGO_FILE:=chrome-linux-$(PGO_VER).profdata
|
||||
define Download/PGO_PROF
|
||||
URL:=https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles
|
||||
URL_FILE:=$(PGO_FILE)
|
||||
FILE:=$(PGO_FILE)
|
||||
HASH:=e9a52f7a60d46fd6e682b0e908b1363faeb6f96bc2e95d5d95095b33fa67e34a
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
mkdir -p "chrome/build/pgo_profiles" ; \
|
||||
$(CP) "$(DL_DIR)/$(PGO_FILE)" "chrome/build/pgo_profiles" ; \
|
||||
mkdir -p "third_party/llvm-build/Release+Asserts" ; \
|
||||
$(TAR) -xzf "$(DL_DIR)/$(CLANG_FILE)" -C "third_party/llvm-build/Release+Asserts" ; \
|
||||
echo -e "llvmorg-$(CLANG_VER)" > "third_party/llvm-build/Release+Asserts/cr_build_revision" ; \
|
||||
mkdir -p "gn/out" ; \
|
||||
unzip -o "$(DL_DIR)/$(GN_FILE)" -d "gn/out" ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd "$(PKG_BUILD_DIR)/src" ; \
|
||||
. ../init_env.sh "$(ARCH)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
|
||||
export naive_flags+=" $$$${naive_ccache_flags}" ; \
|
||||
mkdir -p "out" ; \
|
||||
./gn/out/gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="python3" ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
ninja -C "$(PKG_BUILD_DIR)/src/out/Release" naive
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/out/Release/naive $(1)/usr/bin/naive
|
||||
endef
|
||||
|
||||
$(eval $(call Download,CLANG))
|
||||
$(eval $(call Download,GN_TOOL))
|
||||
$(eval $(call Download,PGO_PROF))
|
||||
|
||||
$(eval $(call BuildPackage,naiveproxy))
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=naiveproxy
|
||||
PKG_VERSION:=109.0.5414.74-1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=eb0b7d4ee7e34aff5bd9f7ff662a707c059e3739da47cd52e6d5edfff988123a
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),)
|
||||
PKG_BUILD_DEPENDS+= ninja/host
|
||||
endif
|
||||
NINJA ?= ninja
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
ifneq ($(CONFIG_CPU_TYPE)," ")
|
||||
CPU_TYPE:=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE)))
|
||||
CPU_SUBTYPE:=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE)))
|
||||
ifeq ($(CPU_SUBTYPE),)
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
else
|
||||
CPU_TYPE:=""
|
||||
CPU_SUBTYPE:=""
|
||||
endif
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/naiveproxy
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=Make a fortune quietly
|
||||
URL:=https://github.com/klzgrad/naiveproxy
|
||||
DEPENDS:=@!(arc||armeb||mips||mips64||powerpc||TARGET_gemini) +libatomic
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/description
|
||||
NaïveProxy uses Chrome's network stack to camouflage traffic with strong
|
||||
censorship resistance and low detectability. Reusing Chrome's stack also
|
||||
ensures best practices in performance and security.
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_CCACHE),)
|
||||
export CCACHE_SLOPPINESS=time_macros
|
||||
export CCACHE_BASEDIR=$(PKG_BUILD_DIR)/src
|
||||
export CCACHE_CPP2=yes
|
||||
export naive_ccache_flags=cc_wrapper="$(CCACHE)"
|
||||
endif
|
||||
|
||||
CLANG_VER:=16-init-8697-g60809cd2-1
|
||||
CLANG_FILE:=clang-llvmorg-$(CLANG_VER).tgz
|
||||
define Download/CLANG
|
||||
URL:=https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64
|
||||
URL_FILE:=$(CLANG_FILE)
|
||||
FILE:=$(CLANG_FILE)
|
||||
HASH:=5ae35f85e0d32136795c6b223bf64263d46678dd4a24fea4e9039e58a32670de
|
||||
endef
|
||||
|
||||
GN_VER:=1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41
|
||||
GN_FILE:=gn-git_revision-$(GN_VER).zip
|
||||
define Download/GN_TOOL
|
||||
URL:=https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-amd64/+
|
||||
URL_FILE:=git_revision:$(GN_VER)
|
||||
FILE:=$(GN_FILE)
|
||||
HASH:=7195291488d08f3a10e85b85d8c4816e077015f1c5f196f770003a97aa42caf8
|
||||
endef
|
||||
|
||||
PGO_VER:=5414-1672766927-26b17aa1745606599e619feccfe46371e879e7c4
|
||||
PGO_FILE:=chrome-linux-$(PGO_VER).profdata
|
||||
define Download/PGO_PROF
|
||||
URL:=https://storage.googleapis.com/chromium-optimization-profiles/pgo_profiles
|
||||
URL_FILE:=$(PGO_FILE)
|
||||
FILE:=$(PGO_FILE)
|
||||
HASH:=e9a52f7a60d46fd6e682b0e908b1363faeb6f96bc2e95d5d95095b33fa67e34a
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
( \
|
||||
pushd $(PKG_BUILD_DIR)/src ; \
|
||||
mkdir -p "chrome/build/pgo_profiles" ; \
|
||||
$(CP) "$(DL_DIR)/$(PGO_FILE)" "chrome/build/pgo_profiles" ; \
|
||||
mkdir -p "third_party/llvm-build/Release+Asserts" ; \
|
||||
$(TAR) -xzf "$(DL_DIR)/$(CLANG_FILE)" -C "third_party/llvm-build/Release+Asserts" ; \
|
||||
echo -e "llvmorg-$(CLANG_VER)" > "third_party/llvm-build/Release+Asserts/cr_build_revision" ; \
|
||||
mkdir -p "gn/out" ; \
|
||||
unzip -o "$(DL_DIR)/$(GN_FILE)" -d "gn/out" ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
( \
|
||||
pushd "$(PKG_BUILD_DIR)/src" ; \
|
||||
. ../init_env.sh "$(ARCH)" $(CPU_TYPE) $(CPU_SUBTYPE) "$(TOOLCHAIN_DIR)" ; \
|
||||
export naive_flags+=" $$$${naive_ccache_flags}" ; \
|
||||
mkdir -p "out" ; \
|
||||
./gn/out/gn gen "out/Release" --args="$$$${naive_flags}" --script-executable="$(PYTHON)" ; \
|
||||
popd ; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
+$(NINJA) -C "$(PKG_BUILD_DIR)/src/out/Release" naive
|
||||
endef
|
||||
|
||||
define Package/naiveproxy/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/out/Release/naive $(1)/usr/bin/naive
|
||||
endef
|
||||
|
||||
$(eval $(call Download,CLANG))
|
||||
$(eval $(call Download,GN_TOOL))
|
||||
$(eval $(call Download,PGO_PROF))
|
||||
|
||||
$(eval $(call BuildPackage,naiveproxy))
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
--- a/src/base/allocator/partition_allocator/tagging.cc
|
||||
+++ b/src/base/allocator/partition_allocator/tagging.cc
|
||||
@@ -18,22 +18,25 @@
|
||||
#define PR_GET_TAGGED_ADDR_CTRL 56
|
||||
#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
-#include <linux/version.h>
|
||||
-
|
||||
-// Linux headers already provide these since v5.10.
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
||||
-#define HAS_PR_MTE_MACROS
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-#ifndef HAS_PR_MTE_MACROS
|
||||
+#ifndef PR_MTE_TCF_SHIFT
|
||||
#define PR_MTE_TCF_SHIFT 1
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_NONE
|
||||
#define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_SYNC
|
||||
#define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_ASYNC
|
||||
#define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_MASK
|
||||
#define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TAG_SHIFT
|
||||
#define PR_MTE_TAG_SHIFT 3
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TAG_MASK
|
||||
#define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
|
||||
#endif
|
||||
#endif
|
||||
--- a/src/base/allocator/partition_allocator/tagging.cc
|
||||
+++ b/src/base/allocator/partition_allocator/tagging.cc
|
||||
@@ -18,22 +18,25 @@
|
||||
#define PR_GET_TAGGED_ADDR_CTRL 56
|
||||
#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
-#include <linux/version.h>
|
||||
-
|
||||
-// Linux headers already provide these since v5.10.
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
|
||||
-#define HAS_PR_MTE_MACROS
|
||||
-#endif
|
||||
-#endif
|
||||
-
|
||||
-#ifndef HAS_PR_MTE_MACROS
|
||||
+#ifndef PR_MTE_TCF_SHIFT
|
||||
#define PR_MTE_TCF_SHIFT 1
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_NONE
|
||||
#define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_SYNC
|
||||
#define PR_MTE_TCF_SYNC (1UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_ASYNC
|
||||
#define PR_MTE_TCF_ASYNC (2UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TCF_MASK
|
||||
#define PR_MTE_TCF_MASK (3UL << PR_MTE_TCF_SHIFT)
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TAG_SHIFT
|
||||
#define PR_MTE_TAG_SHIFT 3
|
||||
+#endif
|
||||
+#ifndef PR_MTE_TAG_MASK
|
||||
#define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
199
naiveproxy/src/init_env.sh
Executable file → Normal file
199
naiveproxy/src/init_env.sh
Executable file → Normal file
@@ -1,99 +1,100 @@
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
# --------------------------------------------------------
|
||||
# Init build dependencies for naiveproxy
|
||||
|
||||
# Read args from shell
|
||||
target_arch="$1"
|
||||
cpu_type="$2"
|
||||
cpu_subtype="$3"
|
||||
toolchain_dir="$4"
|
||||
|
||||
# Set arch info
|
||||
case "${target_arch}" in
|
||||
"aarch64")
|
||||
naive_arch="arm64"
|
||||
;;
|
||||
"i386")
|
||||
naive_arch="x86"
|
||||
;;
|
||||
"x86_64")
|
||||
naive_arch="x64"
|
||||
;;
|
||||
*)
|
||||
naive_arch="${target_arch}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# OS detection
|
||||
[ "$(uname)" != "Linux" -o "$(uname -m)" != "x86_64" ] && { echo -e "Support Linux AMD64 only."; exit 1; }
|
||||
|
||||
# Create TMP dir
|
||||
mkdir -p "$PWD/tmp"
|
||||
export TMPDIR="$PWD/tmp"
|
||||
|
||||
# Set ENV
|
||||
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
export naive_flags="
|
||||
is_official_build=true
|
||||
exclude_unwind_tables=true
|
||||
enable_resource_allowlist_generation=false
|
||||
symbol_level=1
|
||||
is_clang=true
|
||||
use_sysroot=false
|
||||
|
||||
fatal_linker_warnings=false
|
||||
treat_warnings_as_errors=false
|
||||
|
||||
enable_base_tracing=false
|
||||
use_udev=false
|
||||
use_aura=false
|
||||
use_ozone=false
|
||||
use_gio=false
|
||||
use_gtk=false
|
||||
use_platform_icu_alternatives=true
|
||||
use_glib=false
|
||||
|
||||
disable_file_support=true
|
||||
enable_websockets=false
|
||||
use_kerberos=false
|
||||
enable_mdns=false
|
||||
enable_reporting=false
|
||||
include_transport_security_state_preload_list=false
|
||||
use_nss_certs=false
|
||||
|
||||
target_os=\"openwrt\"
|
||||
target_cpu=\"${naive_arch}\"
|
||||
target_sysroot=\"${toolchain_dir}\""
|
||||
|
||||
case "${target_arch}" in
|
||||
"arm")
|
||||
naive_flags+=" arm_version=0 arm_cpu=\"${cpu_type}\""
|
||||
case "${cpu_type}" in "arm1176jzf-s"|"arm926ej-s"|"mpcore"|"xscale") naive_flags+=" arm_use_thumb=false" ;; esac
|
||||
if [ -n "${cpu_subtype}" ]; then
|
||||
if grep -q "neon" <<< "${cpu_subtype}"; then
|
||||
neon_flag="arm_use_neon=true"
|
||||
else
|
||||
neon_flag="arm_use_neon=false"
|
||||
fi
|
||||
naive_flags+=" arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"
|
||||
else
|
||||
naive_flags+=" arm_float_abi=\"soft\" arm_use_neon=false"
|
||||
fi
|
||||
;;
|
||||
"arm64")
|
||||
[ -n "${cpu_type}" ] && naive_flags+=" arm_cpu=\"${cpu_type}\""
|
||||
;;
|
||||
"mipsel"|"mips64el")
|
||||
naive_flags+=" use_thin_lto=false chrome_pgo_phase=0 mips_arch_variant=\"r2\""
|
||||
if [ "${target_arch}" == "mipsel" ]; then
|
||||
if [ "${cpu_subtype}" == "24kf" ]; then
|
||||
naive_flags+=" mips_float_abi=\"hard\""
|
||||
else
|
||||
naive_flags+=" mips_float_abi=\"soft\""
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
#!/bin/bash
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
# --------------------------------------------------------
|
||||
# Init build dependencies for naiveproxy
|
||||
|
||||
# Read args from shell
|
||||
target_arch="$1"
|
||||
cpu_type="$2"
|
||||
cpu_subtype="$3"
|
||||
toolchain_dir="$4"
|
||||
|
||||
# Set arch info
|
||||
case "${target_arch}" in
|
||||
"aarch64")
|
||||
naive_arch="arm64"
|
||||
;;
|
||||
"i386")
|
||||
naive_arch="x86"
|
||||
;;
|
||||
"x86_64")
|
||||
naive_arch="x64"
|
||||
;;
|
||||
*)
|
||||
naive_arch="${target_arch}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# OS detection
|
||||
[ "$(uname)" != "Linux" -o "$(uname -m)" != "x86_64" ] && { echo -e "Support Linux AMD64 only."; exit 1; }
|
||||
|
||||
# Create TMP dir
|
||||
mkdir -p "$PWD/tmp"
|
||||
export TMPDIR="$PWD/tmp"
|
||||
|
||||
# Set ENV
|
||||
export DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||
export naive_flags="
|
||||
is_official_build=true
|
||||
exclude_unwind_tables=true
|
||||
enable_resource_allowlist_generation=false
|
||||
symbol_level=1
|
||||
is_clang=true
|
||||
use_sysroot=false
|
||||
|
||||
fatal_linker_warnings=false
|
||||
treat_warnings_as_errors=false
|
||||
|
||||
enable_base_tracing=false
|
||||
use_udev=false
|
||||
use_aura=false
|
||||
use_ozone=false
|
||||
use_gio=false
|
||||
use_gtk=false
|
||||
use_platform_icu_alternatives=true
|
||||
use_glib=false
|
||||
|
||||
disable_file_support=true
|
||||
enable_websockets=false
|
||||
use_kerberos=false
|
||||
enable_mdns=false
|
||||
enable_reporting=false
|
||||
include_transport_security_state_preload_list=false
|
||||
use_nss_certs=false
|
||||
|
||||
target_os=\"openwrt\"
|
||||
target_cpu=\"${naive_arch}\"
|
||||
target_sysroot=\"${toolchain_dir}\""
|
||||
|
||||
case "${target_arch}" in
|
||||
"arm")
|
||||
naive_flags+=" arm_version=0 arm_cpu=\"${cpu_type}\""
|
||||
if [ -n "${cpu_subtype}" ]; then
|
||||
if grep -q "neon" <<< "${cpu_subtype}"; then
|
||||
neon_flag="arm_use_neon=true"
|
||||
else
|
||||
neon_flag="arm_use_neon=false"
|
||||
fi
|
||||
naive_flags+=" arm_fpu=\"${cpu_subtype}\" arm_float_abi=\"hard\" ${neon_flag}"
|
||||
else
|
||||
naive_flags+=" arm_float_abi=\"soft\" arm_use_neon=false"
|
||||
fi
|
||||
case "${cpu_type}" in
|
||||
"arm1176jzf-s"|"arm926ej-s"|"mpcore"|"xscale")
|
||||
naive_flags+=" arm_use_thumb=false"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"mipsel"|"mips64el")
|
||||
naive_flags+=" use_thin_lto=false chrome_pgo_phase=0 mips_arch_variant=\"r2\""
|
||||
if [ "${target_arch}" == "mipsel" ]; then
|
||||
if [ "${cpu_subtype}" == "24kf" ]; then
|
||||
naive_flags+=" mips_float_abi=\"hard\""
|
||||
else
|
||||
naive_flags+=" mips_float_abi=\"soft\""
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,112 +1,146 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sagernet-core
|
||||
BASE_VERSION:=5.0.17
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/SagerNet/v2ray-core.git
|
||||
PKG_SOURCE_DATE:=2022-07-30
|
||||
PKG_SOURCE_VERSION:=26e36b1cb46f387cacd65c1a5900be592913f842
|
||||
PKG_MIRROR_HASH:=f8968ef7df8775f28c30f8115e2ce2e9324b1753526af6c89631edf1b1f56f8d
|
||||
PKG_VERSION:=$(BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/v2fly/v2ray-core/v5
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/main
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG).build=OpenWrt \
|
||||
$(GO_PKG).version=$(BASE_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/sagernet/template
|
||||
TITLE:=An enhanced v2ray edition for SagerNet
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://sagernet.org
|
||||
endef
|
||||
|
||||
define Package/sagernet-core
|
||||
$(call Package/sagernet/template)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
CONFLICTS:=v2ray-core xray-core
|
||||
endef
|
||||
|
||||
define Package/sagernet-extra
|
||||
$(call Package/sagernet/template)
|
||||
TITLE+= (extra resources)
|
||||
DEPENDS:=sagernet-core
|
||||
CONFLICTS:=v2ray-extra
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/sagernet/description
|
||||
Project V is a set of network tools that help you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
endef
|
||||
|
||||
define Package/sagernet-core/description
|
||||
$(call Package/sagernet/description)
|
||||
|
||||
This is a v2ray-core fork for SagerNet.
|
||||
endef
|
||||
|
||||
define Package/sagernet-extra/description
|
||||
$(call Package/sagernet/description)
|
||||
|
||||
This includes extra resources for sagernet-core.
|
||||
endef
|
||||
|
||||
LIBCORE_NAME:=LibSagerNetCore
|
||||
LIBCORE_DATE:=2022-06-10
|
||||
LIBCORE_VERSION:=9ef7ab1de7604ab959222d4de8ab6152a402e432
|
||||
LIBCORE_FILE:=$(LIBCORE_NAME)-$(LIBCORE_DATE)-$(call version_abbrev,$(LIBCORE_VERSION)).tar.xz
|
||||
define Download/libcore
|
||||
PROTO:=git
|
||||
URL:=https://github.com/SagerNet/LibSagerNetCore.git
|
||||
VERSION:=$(LIBCORE_VERSION)
|
||||
FILE:=$(LIBCORE_FILE)
|
||||
SUBDIR:=$(LIBCORE_NAME)
|
||||
MIRROR_HASH:=9420189c45d5fbe682acee1da0b8f727cc5ea8c847ceeff5b026cd71ce60cf0f
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
xzcat $(DL_DIR)/$(LIBCORE_FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(CP) $(PKG_BUILD_DIR)/$(LIBCORE_NAME)/{obfs,ssr}.go \
|
||||
$(PKG_BUILD_DIR)/proxy/shadowsocks/plugin/self/
|
||||
$(SED) '/plugin\/self/d' -e 's/self.ParsePluginOptions/ParsePluginOptions/g' \
|
||||
$(PKG_BUILD_DIR)/proxy/shadowsocks/plugin/self/obfs.go
|
||||
$(SED) 's/package libcore/package self/g' \
|
||||
$(PKG_BUILD_DIR)/proxy/shadowsocks/plugin/self/{obfs,ssr}.go
|
||||
endef
|
||||
|
||||
define Package/sagernet-core/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/v2ray
|
||||
$(LN) v2ray $(1)/usr/bin/xray
|
||||
endef
|
||||
|
||||
define Package/sagernet-extra/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray/
|
||||
$(CP) $(PKG_BUILD_DIR)/release/extra/* $(1)/usr/share/v2ray/
|
||||
endef
|
||||
|
||||
$(eval $(call Download,libcore))
|
||||
$(eval $(call BuildPackage,sagernet-core))
|
||||
$(eval $(call BuildPackage,sagernet-extra))
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sagernet-core
|
||||
BASE_VERSION:=5.0.17
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/SagerNet/v2ray-core.git
|
||||
PKG_SOURCE_DATE:=2022-07-30
|
||||
PKG_SOURCE_VERSION:=26e36b1cb46f387cacd65c1a5900be592913f842
|
||||
PKG_MIRROR_HASH:=f8968ef7df8775f28c30f8115e2ce2e9324b1753526af6c89631edf1b1f56f8d
|
||||
PKG_VERSION:=$(BASE_VERSION)-$(PKG_SOURCE_DATE)-$(call version_abbrev,$(PKG_SOURCE_VERSION))
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/v2fly/v2ray-core/v5
|
||||
GO_PKG_BUILD_PKG:=$(GO_PKG)/main
|
||||
GO_PKG_LDFLAGS_X:= \
|
||||
$(GO_PKG).build=OpenWrt \
|
||||
$(GO_PKG).version=$(BASE_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/sagernet/template
|
||||
TITLE:=An enhanced v2ray edition for SagerNet
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
URL:=https://sagernet.org
|
||||
endef
|
||||
|
||||
define Package/sagernet-core
|
||||
$(call Package/sagernet/template)
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
CONFLICTS:=v2ray-core xray-core
|
||||
endef
|
||||
|
||||
define Package/sagernet-example
|
||||
$(call Package/sagernet/template)
|
||||
TITLE+= (example configs)
|
||||
DEPENDS:=sagernet-core
|
||||
CONFLICTS:=v2ray-example
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/sagernet-extra
|
||||
$(call Package/sagernet/template)
|
||||
TITLE+= (extra resources)
|
||||
DEPENDS:=sagernet-core
|
||||
CONFLICTS:=v2ray-extra
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/sagernet/description
|
||||
Project V is a set of network tools that help you to build your own computer network.
|
||||
It secures your network connections and thus protects your privacy.
|
||||
endef
|
||||
|
||||
define Package/sagernet-core/description
|
||||
$(call Package/sagernet/description)
|
||||
|
||||
This is a v2ray-core fork for SagerNet.
|
||||
endef
|
||||
|
||||
define Package/sagernet-example/description
|
||||
$(call Package/sagernet/description)
|
||||
|
||||
This includes example configuration files for sagernet-core.
|
||||
endef
|
||||
|
||||
define Package/sagernet-extra/description
|
||||
$(call Package/sagernet/description)
|
||||
|
||||
This includes extra resources for sagernet-core.
|
||||
endef
|
||||
|
||||
define Package/sagernet-core/conffiles
|
||||
/etc/config/v2ray
|
||||
/etc/v2ray/
|
||||
endef
|
||||
|
||||
LIBCORE_NAME:=LibSagerNetCore
|
||||
LIBCORE_DATE:=2022-06-10
|
||||
LIBCORE_VERSION:=9ef7ab1de7604ab959222d4de8ab6152a402e432
|
||||
LIBCORE_FILE:=$(LIBCORE_NAME)-$(LIBCORE_DATE)-$(call version_abbrev,$(LIBCORE_VERSION)).tar.xz
|
||||
define Download/libcore
|
||||
PROTO:=git
|
||||
URL:=https://github.com/SagerNet/LibSagerNetCore.git
|
||||
VERSION:=$(LIBCORE_VERSION)
|
||||
FILE:=$(LIBCORE_FILE)
|
||||
SUBDIR:=$(LIBCORE_NAME)
|
||||
MIRROR_HASH:=9420189c45d5fbe682acee1da0b8f727cc5ea8c847ceeff5b026cd71ce60cf0f
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
xzcat $(DL_DIR)/$(LIBCORE_FILE) | tar -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
|
||||
$(CP) $(PKG_BUILD_DIR)/$(LIBCORE_NAME)/{obfs,ssr}.go \
|
||||
$(PKG_BUILD_DIR)/proxy/shadowsocks/plugin/self/
|
||||
$(SED) '/plugin\/self/d' -e 's/self.ParsePluginOptions/ParsePluginOptions/g' \
|
||||
$(PKG_BUILD_DIR)/proxy/shadowsocks/plugin/self/obfs.go
|
||||
$(SED) 's/package libcore/package self/g' \
|
||||
$(PKG_BUILD_DIR)/proxy/shadowsocks/plugin/self/{obfs,ssr}.go
|
||||
endef
|
||||
|
||||
define Package/sagernet-core/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/v2ray
|
||||
$(LN) v2ray $(1)/usr/bin/xray
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/config.json $(1)/etc/v2ray/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) $(CURDIR)/files/v2ray.conf $(1)/etc/config/v2ray
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) $(CURDIR)/files/v2ray.init $(1)/etc/init.d/v2ray
|
||||
endef
|
||||
|
||||
define Package/sagernet-example/install
|
||||
$(INSTALL_DIR) $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_socks_vmess.json $(1)/etc/v2ray/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/vpoint_vmess_freedom.json $(1)/etc/v2ray/
|
||||
endef
|
||||
|
||||
define Package/sagernet-extra/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray/
|
||||
$(CP) $(PKG_BUILD_DIR)/release/extra/* $(1)/usr/share/v2ray/
|
||||
endef
|
||||
|
||||
$(eval $(call Download,libcore))
|
||||
$(eval $(call BuildPackage,sagernet-core))
|
||||
$(eval $(call BuildPackage,sagernet-example))
|
||||
$(eval $(call BuildPackage,sagernet-extra))
|
||||
|
||||
11
sagernet-core/files/v2ray.conf
Normal file
11
sagernet-core/files/v2ray.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
config v2ray 'enabled'
|
||||
option enabled '0'
|
||||
|
||||
config v2ray 'config'
|
||||
option confdir '/etc/v2ray'
|
||||
list conffiles '/etc/v2ray/config.json'
|
||||
option datadir '/usr/share/v2ray'
|
||||
option format 'json'
|
||||
option memconservative '1'
|
||||
|
||||
57
sagernet-core/files/v2ray.init
Normal file
57
sagernet-core/files/v2ray.init
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
USE_PROCD=1
|
||||
START=99
|
||||
|
||||
CONF="v2ray"
|
||||
PROG="/usr/bin/v2ray"
|
||||
|
||||
start_service() {
|
||||
config_load "$CONF"
|
||||
|
||||
local enabled
|
||||
config_get_bool enabled "enabled" "enabled" "0"
|
||||
[ "$enabled" -eq "0" ] && exit 1
|
||||
|
||||
local confdir
|
||||
local conffiles
|
||||
local datadir
|
||||
local format
|
||||
|
||||
config_get confdir "config" "confdir"
|
||||
config_get conffiles "config" "conffiles"
|
||||
config_get datadir "config" "datadir" "/usr/share/v2ray"
|
||||
config_get format "config" "format" "json"
|
||||
config_get_bool memconservative "config" "memconservative" "1"
|
||||
|
||||
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"
|
||||
procd_set_param env v2ray.local.asset="$datadir"
|
||||
[ "$memconservative" -eq "1" ] && procd_append_param env V2RAY_CONF_GEOLOADER="memconservative"
|
||||
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,59 +1,59 @@
|
||||
go get github.com/Dreamacro/clash/transport/ssr/protocol
|
||||
go get github.com/Dreamacro/clash/transport/ssr/obfs
|
||||
go get github.com/Dreamacro/clash/transport/simple-obfs
|
||||
---
|
||||
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -3,6 +3,7 @@ module github.com/v2fly/v2ray-core/v5
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
+ github.com/Dreamacro/clash v1.11.4
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da
|
||||
github.com/dgryski/go-camellia v0.0.0-20191119043421-69a8a13fb23d
|
||||
github.com/dgryski/go-idea v0.0.0-20170306091226-d2fb45a411fb
|
||||
@@ -82,6 +83,7 @@ require (
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
|
||||
github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 // indirect
|
||||
+ github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/xtaci/smux v1.5.16 // indirect
|
||||
go4.org/intern v0.0.0-20220301175310-a089fc204883 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -20,6 +20,8 @@ dmitri.shuralyov.com/state v0.0.0-201802
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
+github.com/Dreamacro/clash v1.11.4 h1:ZQe/7G+JclA1vvyAn8MtaEBvQK73mWR6lV3BceDaJoY=
|
||||
+github.com/Dreamacro/clash v1.11.4/go.mod h1:ParIZ6P19q5GDgRE+HV/co7GunFRmvN31YFgNp4cwDw=
|
||||
github.com/FlowerWrong/water v0.0.0-20180301012659-01a4eaa1f6f2/go.mod h1:xrG5L7lq7T2DLnPr2frMnL906CNEoKRwLB+VYFhPq2w=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
|
||||
@@ -396,6 +398,8 @@ github.com/shurcooL/sanitized_anchor_nam
|
||||
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
|
||||
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
@@ -455,6 +459,7 @@ go.opentelemetry.io/proto/otlp v0.7.0/go
|
||||
go.starlark.net v0.0.0-20220714194419-4cadf0a12139 h1:zMemyQYZSyEdPaUFixYICrXf/0Rfnil7+jiQRf5IBZ0=
|
||||
go.starlark.net v0.0.0-20220714194419-4cadf0a12139/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
+go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
|
||||
@@ -572,6 +577,7 @@ golang.org/x/sys v0.0.0-20190606165138-5
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
go get github.com/Dreamacro/clash/transport/ssr/protocol
|
||||
go get github.com/Dreamacro/clash/transport/ssr/obfs
|
||||
go get github.com/Dreamacro/clash/transport/simple-obfs
|
||||
---
|
||||
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -3,6 +3,7 @@ module github.com/v2fly/v2ray-core/v5
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
+ github.com/Dreamacro/clash v1.11.4
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da
|
||||
github.com/dgryski/go-camellia v0.0.0-20191119043421-69a8a13fb23d
|
||||
github.com/dgryski/go-idea v0.0.0-20170306091226-d2fb45a411fb
|
||||
@@ -82,6 +83,7 @@ require (
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
|
||||
github.com/secure-io/siv-go v0.0.0-20180922214919-5ff40651e2c4 // indirect
|
||||
+ github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/xtaci/smux v1.5.16 // indirect
|
||||
go4.org/intern v0.0.0-20220301175310-a089fc204883 // indirect
|
||||
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -20,6 +20,8 @@ dmitri.shuralyov.com/state v0.0.0-201802
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
+github.com/Dreamacro/clash v1.11.4 h1:ZQe/7G+JclA1vvyAn8MtaEBvQK73mWR6lV3BceDaJoY=
|
||||
+github.com/Dreamacro/clash v1.11.4/go.mod h1:ParIZ6P19q5GDgRE+HV/co7GunFRmvN31YFgNp4cwDw=
|
||||
github.com/FlowerWrong/water v0.0.0-20180301012659-01a4eaa1f6f2/go.mod h1:xrG5L7lq7T2DLnPr2frMnL906CNEoKRwLB+VYFhPq2w=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
|
||||
@@ -396,6 +398,8 @@ github.com/shurcooL/sanitized_anchor_nam
|
||||
github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
|
||||
github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
+github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
+github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
@@ -455,6 +459,7 @@ go.opentelemetry.io/proto/otlp v0.7.0/go
|
||||
go.starlark.net v0.0.0-20220714194419-4cadf0a12139 h1:zMemyQYZSyEdPaUFixYICrXf/0Rfnil7+jiQRf5IBZ0=
|
||||
go.starlark.net v0.0.0-20220714194419-4cadf0a12139/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
+go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
|
||||
@@ -572,6 +577,7 @@ golang.org/x/sys v0.0.0-20190606165138-5
|
||||
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=smartdns
|
||||
PKG_VERSION:=40
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/pymumu/smartdns/tar.gz/Release$(PKG_VERSION)?
|
||||
PKG_HASH:=780626e709174e38fbd7e5e1b6cd867ae680cb55a38d2c6c24bdae4265beb5bf
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-Release$(PKG_VERSION)
|
||||
|
||||
PKG_MAINTAINER:=Nick Peng <pymumu@gmail.com>
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
MAKE_PATH:=src
|
||||
MAKE_VARS+= VER=$(PKG_VERSION)
|
||||
|
||||
define Package/smartdns
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=smartdns server
|
||||
DEPENDS:=+libpthread +libopenssl
|
||||
URL:=https://www.github.com/pymumu/smartdns/
|
||||
endef
|
||||
|
||||
define Package/smartdns/description
|
||||
SmartDNS is a local DNS server which accepts DNS query requests from local network clients,
|
||||
gets DNS query results from multiple upstream DNS servers concurrently, and returns the fastest IP to clients.
|
||||
Unlike dnsmasq's all-servers, smartdns returns the fastest IP.
|
||||
endef
|
||||
|
||||
define Package/smartdns/conffiles
|
||||
/etc/config/smartdns
|
||||
/etc/smartdns/address.conf
|
||||
/etc/smartdns/blacklist-ip.conf
|
||||
/etc/smartdns/custom.conf
|
||||
endef
|
||||
|
||||
define Package/smartdns/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/smartdns
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
|
||||
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
|
||||
$(INSTALL_CONF) $(CURDIR)/conf/custom.conf $(1)/etc/smartdns/custom.conf
|
||||
$(INSTALL_CONF) $(CURDIR)/conf/smartdns.conf $(1)/etc/config/smartdns
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,smartdns))
|
||||
@@ -1,48 +0,0 @@
|
||||
# Add custom settings here.
|
||||
|
||||
# set log level
|
||||
# log-level [level], level=fatal, error, warn, notice, info, debug
|
||||
# log-level error
|
||||
|
||||
# log-size k,m,g
|
||||
# log-size 128k
|
||||
|
||||
# log-file /var/log/smartdns.log
|
||||
# log-num 2
|
||||
|
||||
# List of hosts that supply bogus NX domain results
|
||||
# bogus-nxdomain [ip/subnet]
|
||||
|
||||
speed-check-mode tcp:80,ping
|
||||
|
||||
server 101.6.6.6:5353
|
||||
server 202.38.93.153:5353
|
||||
server 202.141.162.123:5353
|
||||
server 202.141.178.13:5353
|
||||
server 2001:da8::666
|
||||
server 208.67.222.222:5353 -group fq_dns -exclude-default-group
|
||||
server 208.67.220.220:5353 -group fq_dns -exclude-default-group
|
||||
|
||||
server-tcp 1.0.0.1 -group fq_dns -exclude-default-group
|
||||
server-tcp 8.8.4.4 -group fq_dns -exclude-default-group
|
||||
server-tcp 149.112.112.112 -group fq_dns -exclude-default-group
|
||||
server-tcp 2606:4700:4700::1001 -group fq_dns -exclude-default-group
|
||||
|
||||
server-tls 115.159.131.230 -host-name dns.rubyfish.cn
|
||||
server-tls dns.rubyfish.cn
|
||||
server-tls 1.1.1.1 -host-name 1dot1dot1dot1.cloudflare-dns.com -group fq_dns -exclude-default-group
|
||||
server-tls 2606:4700:4700::1111 -host-name 1dot1dot1dot1.cloudflare-dns.com -group fq_dns -exclude-default-group
|
||||
server-tls 1dot1dot1dot1.cloudflare-dns.com -group fq_dns -exclude-default-group
|
||||
server-tls 8.8.8.8 -host-name dns.google -group fq_dns -exclude-default-group
|
||||
server-tls dns.google -group fq_dns -exclude-default-group
|
||||
|
||||
server-https https://202.38.93.153/resolve -host-name neatdns.ustclug.org -http-host neatdns.ustclug.org
|
||||
server-https https://202.141.178.13/resolve -host-name neatdns.ustclug.org -http-host neatdns.ustclug.org
|
||||
server-https https://[2001:da8:d800:931::153]/resolve -host-name neatdns.ustclug.org -http-host neatdns.ustclug.org
|
||||
server-https https://neatdns.ustclug.org/resolve
|
||||
server-https https://rubyfish.cn/dns-query
|
||||
server-https https://i.233py.com/dns-query
|
||||
server-https https://9.9.9.9/dns-query -group fq_dns -exclude-default-group
|
||||
server-https https://dns9.quad9.net/dns-query -group fq_dns -exclude-default-group
|
||||
server-https https://146.112.41.2/dns-query -host-name doh.opendns.com -http-host doh.opendns.com -group fq_dns -exclude-default-group
|
||||
server-https https://doh.opendns.com/dns-query -group fq_dns -exclude-default-group
|
||||
@@ -1,31 +0,0 @@
|
||||
config 'smartdns'
|
||||
option server_name 'smartdns'
|
||||
option dualstack_ip_selection '1'
|
||||
option prefetch_domain '1'
|
||||
option serve_expired '1'
|
||||
option seconddns_no_speed_check '0'
|
||||
option seconddns_no_dualstack_selection '0'
|
||||
option seconddns_no_cache '0'
|
||||
option tcp_server '0'
|
||||
option seconddns_tcp_server '0'
|
||||
option coredump '0'
|
||||
option port '6053'
|
||||
option ipv6_server '0'
|
||||
option redirect 'dnsmasq-upstream'
|
||||
option seconddns_port '5335'
|
||||
option seconddns_server_group 'fq_dns'
|
||||
option seconddns_enabled '1'
|
||||
option seconddns_no_rule_addr '0'
|
||||
option seconddns_no_rule_nameserver '0'
|
||||
option seconddns_no_rule_ipset '0'
|
||||
option seconddns_no_rule_soa '0'
|
||||
option enabled '0'
|
||||
option cache_size '20000'
|
||||
option rr_ttl '3600'
|
||||
option rr_ttl_min '5'
|
||||
list old_redirect 'dnsmasq-upstream'
|
||||
list old_port '6053'
|
||||
list old_enabled '0'
|
||||
|
||||
config 'domain-rule'
|
||||
|
||||
@@ -1,34 +1,46 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tcping
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/Mattraks/tcping/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=c703481d1751adf051dd3391c4dccdadc6dfca7484e636222b392e1213312e02
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILE:=license.txt
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/tcping
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=tcping measures the latency of a tcp-connection
|
||||
URL:=https://github.com/jlyo/tcping
|
||||
endef
|
||||
|
||||
define Package/tcping/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tcping))
|
||||
#
|
||||
# Copyright (C) 2014 OpenWrt-dist
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
|
||||
PKG_NAME:=tcping
|
||||
PKG_VERSION:=0.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=license.txt
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/Lienol/tcping
|
||||
PKG_MIRROR_HASH:=79414cd8e1d124422a36b8fe36a1f296b7d9bde99807b2c90ad81bbd65e200e0
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=db9101834732dac9aaa59dbb7fb9c74612dbf723
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/tcping
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=tcping measures the latency of a tcp-connection
|
||||
URL:=https://github.com/jlyo/tcping
|
||||
endef
|
||||
|
||||
define Package/tcping/description
|
||||
endef
|
||||
|
||||
define Package/tcping/conffiles
|
||||
endef
|
||||
|
||||
define Package/tcping/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tcping $(1)/usr/sbin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,tcping))
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-geodata
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202212220107
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/Loyalsoldier/geoip/releases/latest/download
|
||||
URL_FILE:=geoip-only-cn-private.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=202212242209
|
||||
GEOSITE_FILE:=geosite.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download
|
||||
URL_FILE:=geosite.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=skip
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/template
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=IP Addresses and Names
|
||||
URL:=https://www.v2fly.org
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray-geoip
|
||||
$(call Package/v2ray-geodata/template)
|
||||
TITLE:=GeoIP List for V2Ray
|
||||
VERSION:=$(GEOIP_VER)-$(PKG_RELEASE)
|
||||
LICENSE:=CC-BY-SA-4.0
|
||||
endef
|
||||
|
||||
define Package/v2ray-geosite
|
||||
$(call Package/v2ray-geodata/template)
|
||||
TITLE:=Geosite List for V2Ray
|
||||
VERSION:=$(GEOSITE_VER)-$(PKG_RELEASE)
|
||||
LICENSE:=MIT
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-geoip),)
|
||||
$(call Download,geoip)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-geosite),)
|
||||
$(call Download,geosite)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/v2ray-geoip/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/v2ray/geoip.dat
|
||||
endef
|
||||
|
||||
define Package/v2ray-geosite/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_FILE) $(1)/usr/share/v2ray/geosite.dat
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,v2ray-geoip))
|
||||
$(eval $(call BuildPackage,v2ray-geosite))
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2021-2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2ray-geodata
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
GEOIP_VER:=202301260045
|
||||
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
||||
define Download/geoip
|
||||
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
||||
URL_FILE:=geoip.dat
|
||||
FILE:=$(GEOIP_FILE)
|
||||
HASH:=a13a2ca90c15a85f4cc8169d12be24cb71f34bb75eb446000d9ec18ebefd2511
|
||||
endef
|
||||
|
||||
GEOSITE_VER:=20230130083113
|
||||
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
||||
define Download/geosite
|
||||
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
||||
URL_FILE:=dlc.dat
|
||||
FILE:=$(GEOSITE_FILE)
|
||||
HASH:=2dea3ee8e87d573be9a132c395aa990d0b8baac7775af3091552840bd559556d
|
||||
endef
|
||||
|
||||
define Package/v2ray-geodata/template
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=IP Addresses and Names
|
||||
URL:=https://www.v2fly.org
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/v2ray-geoip
|
||||
$(call Package/v2ray-geodata/template)
|
||||
TITLE:=GeoIP List for V2Ray
|
||||
VERSION:=$(GEOIP_VER)-$(PKG_RELEASE)
|
||||
LICENSE:=CC-BY-SA-4.0
|
||||
endef
|
||||
|
||||
define Package/v2ray-geosite
|
||||
$(call Package/v2ray-geodata/template)
|
||||
TITLE:=Geosite List for V2Ray
|
||||
VERSION:=$(GEOSITE_VER)-$(PKG_RELEASE)
|
||||
LICENSE:=MIT
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-geoip),)
|
||||
$(call Download,geoip)
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_v2ray-geosite),)
|
||||
$(call Download,geosite)
|
||||
endif
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/v2ray-geoip/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/v2ray/geoip.dat
|
||||
endef
|
||||
|
||||
define Package/v2ray-geosite/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/v2ray
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_FILE) $(1)/usr/share/v2ray/geosite.dat
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,v2ray-geoip))
|
||||
$(eval $(call BuildPackage,v2ray-geosite))
|
||||
|
||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=v2rayA
|
||||
PKG_VERSION:=1.5.9.1698.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
|
||||
@@ -37,6 +37,8 @@ define Package/v2raya
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
||||
+ca-bundle \
|
||||
+iptables \
|
||||
+IPV6:ip6tables \
|
||||
+iptables-mod-conntrack-extra \
|
||||
+iptables-mod-extra \
|
||||
+iptables-mod-filter \
|
||||
|
||||
3
v2raya/test.sh
Normal file
3
v2raya/test.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
v2raya --version | grep "$PKG_VERSION"
|
||||
Reference in New Issue
Block a user