├── LICENSE ├── README.md ├── adguardhome-go ├── Makefile └── files │ ├── S99adguardhome │ └── adguardhome.conf ├── alertmanager ├── Makefile └── files │ └── S90alertmanager ├── chezmoi └── Makefile ├── dnscrypt-proxy2 ├── Makefile └── files │ └── S09dnscrypt-proxy2 ├── filebrowser ├── Makefile ├── files │ ├── S99filebrowser │ └── filebrowser.conf └── patches │ └── 010-fix-paths.patch ├── frp-go └── Makefile ├── fzf └── Makefile ├── git-lfs └── Makefile ├── go_env.mk ├── goflow ├── Makefile └── files │ ├── S99cnetflow │ ├── S99cnflegacy │ ├── S99csflow │ └── S99goflow ├── gost-go └── Makefile ├── grafana ├── Makefile ├── files │ └── S80grafana └── patches │ └── 010-fix-conf.patch ├── grpcurl └── Makefile ├── headscale ├── Makefile ├── files │ └── S07headscale └── patches │ ├── 010-fix-paths.patch │ └── 020-config.patch ├── kopia ├── Makefile ├── files │ ├── S99kopia │ └── kopia.conf └── patches │ ├── 010-fix-paths.patch │ └── 020-fix-mips-int32.patch ├── lux └── Makefile ├── lyrebird └── Makefile ├── meek └── Makefile ├── micro └── Makefile ├── nebula └── Makefile ├── netbird ├── Makefile ├── files │ └── S99netbird └── patches │ └── 010-fix-paths.patch ├── netflow-exporter ├── Makefile ├── files │ └── S99netflow_exporter └── patches │ ├── 010-fix-mod.patch │ └── 020-fix-err.patch ├── nextdns └── Makefile ├── obfs4 └── Makefile ├── prometheus-blackbox-exporter ├── Makefile └── files │ └── S99blackbox_exporter ├── prometheus-collectd-exporter ├── Makefile └── files │ └── S99collectd_exporter ├── prometheus-haproxy-exporter ├── Makefile └── files │ └── S99haproxy_exporter ├── prometheus-node-exporter ├── Makefile └── files │ └── S99node_exporter ├── prometheus-snmp-exporter ├── Makefile └── files │ └── S99snmp_exporter ├── prometheus-statsd-exporter ├── Makefile └── files │ ├── S99statsd_exporter │ └── statsd_mapping.yml ├── prometheus ├── Makefile └── files │ └── S70prometheus ├── promlens └── Makefile ├── rclone ├── Makefile └── patches │ └── 500-conf-path.patch ├── restic-go └── Makefile ├── sftpgo ├── Makefile ├── files │ └── S21sftpgo └── patches │ └── 010-fix-paths.patch ├── shell2http └── Makefile ├── sing-box-go ├── Makefile ├── files │ └── S99sing-box └── patches │ └── 010-fix-paths.patch ├── snowflake-go ├── Makefile └── patches │ └── 010-fix-paths.patch ├── syncthing ├── Makefile ├── files │ └── S92syncthing └── patches │ └── 500-entware-paths.patch ├── tailscale ├── Makefile ├── files │ └── S06tailscaled └── patches │ └── 010-entware-path.patch ├── telegraf └── Makefile ├── torrserver ├── Makefile └── files │ └── S90torrserver ├── v2ray-plugin └── Makefile ├── v2ray ├── Makefile ├── files │ └── S24v2ray └── patches │ └── 010-fix-paths.patch ├── v2raya ├── Makefile ├── files │ └── S24v2raya └── patches │ └── 010-fix-paths.patch ├── webtunnel └── Makefile ├── wireguard-go ├── Makefile └── patches │ └── 010-entware-ram.patch ├── wireguard-ui ├── Makefile ├── files │ └── S80wireguard-ui └── patches │ ├── 010-fix-cross.patch │ ├── 020-fix-etc-paths.patch │ └── 030-fix-db-paths.patch ├── xray-plugin └── Makefile ├── xray ├── Makefile └── files │ ├── S24xray │ └── config.json.example └── yggdrasil-go └── Makefile /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # entware-go 2 | This is a repo for entware packages in GO language. 3 | -------------------------------------------------------------------------------- /adguardhome-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2019-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=adguardhome 8 | PKG_VERSION:=v0.107.61 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-04-22 13 | PKG_SOURCE_VERSION:=937c16e50dc3a948fc355c22cf03fc63f17c68f2 14 | PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome 15 | PKG_MIRROR_HASH:=660ccdb756dc90031f45be699da4cb2be679ba0ea03fc051d5f1b20ca46a5987 16 | 17 | PKG_LICENSE:=GPL-3.0-only 18 | PKG_LICENSE_FILES:=LICENSE.txt 19 | 20 | PKG_BUILD_DEPENDS:=node-yarn/host 21 | PKG_BUILD_PARALLEL:=1 22 | 23 | include $(INCLUDE_DIR)/package.mk 24 | include $(INCLUDE_DIR)/golang.mk 25 | 26 | define Package/adguardhome-go/Default 27 | SECTION:=net 28 | CATEGORY:=Network 29 | TITLE:=Network-wide ads & trackers blocking DNS server 30 | URL:=https://adguard.com/adguard-home.html 31 | MAINTAINER:=Entware team, https://entware.net 32 | DEPENDS:=+ca-bundle 33 | endef 34 | 35 | define Package/adguardhome-go 36 | $(call Package/adguardhome-go/Default) 37 | VARIANT:=hf 38 | endef 39 | 40 | define Package/adguardhome-go_nohf 41 | $(call Package/adguardhome-go/Default) 42 | VARIANT:=nohf 43 | DEPENDS+=@arm 44 | endef 45 | 46 | define Package/adguardhome-go/description 47 | AdGuard Home is a network-wide software for blocking ads and tracking. 48 | endef 49 | 50 | Package/adguardhome-go_nohf/description=$(Package/adguardhome-go/description) 51 | 52 | define Package/adguardhome-go/conffiles 53 | /opt/etc/AdGuardHome/adguardhome.conf 54 | endef 55 | 56 | Package/adguardhome-go_nohf/conffiles=$(Package/adguardhome-go/conffiles) 57 | 58 | GO_LDFLAGS += \ 59 | -X '$(XIMPORTPATH)/internal/version.channel=release' \ 60 | -X '$(XIMPORTPATH)/internal/version.version=$(PKG_VERSION)' \ 61 | -X '$(XIMPORTPATH)/internal/version.committime=$(PKG_SOURCE_DATE)' 62 | 63 | define Build/Compile 64 | ( cd $(PKG_BUILD_DIR); \ 65 | NODE_OPTIONS=--openssl-legacy-provider \ 66 | $(MAKE) js-deps js-build; \ 67 | ) 68 | ( cd $(PKG_BUILD_DIR); $(GO_BIN_MOD_TIDY); ) 69 | $(call Build/Compile/Go) 70 | endef 71 | 72 | define Package/adguardhome-go/install 73 | $(INSTALL_DIR) $(1)/opt/bin 74 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/AdGuardHome $(1)/opt/bin 75 | $(INSTALL_DIR) $(1)/opt/etc/init.d 76 | $(INSTALL_BIN) ./files/S99adguardhome $(1)/opt/etc/init.d 77 | $(INSTALL_DIR) $(1)/opt/etc/AdGuardHome 78 | $(INSTALL_CONF) ./files/adguardhome.conf $(1)/opt/etc/AdGuardHome 79 | endef 80 | 81 | Package/adguardhome-go_nohf/install=$(Package/adguardhome-go/install) 82 | 83 | $(eval $(call BuildPackage,adguardhome-go)) 84 | $(eval $(call BuildPackage,adguardhome-go_nohf)) 85 | -------------------------------------------------------------------------------- /adguardhome-go/files/S99adguardhome: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . /opt/etc/AdGuardHome/adguardhome.conf 4 | 5 | ENABLED=yes 6 | PROCS=AdGuardHome 7 | ARGS="$OPTIONS" 8 | PREARGS="" 9 | DESC=$PROCS 10 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 11 | 12 | . /opt/etc/init.d/rc.func 13 | -------------------------------------------------------------------------------- /adguardhome-go/files/adguardhome.conf: -------------------------------------------------------------------------------- 1 | # Path to the working directory 2 | DIR="-w /opt/etc/AdGuardHome" 3 | 4 | # Path to log file 5 | LOG="-l /opt/var/log/AdGuardHome.log" 6 | 7 | # Path to a file where PID is stored 8 | PID="--pidfile /opt/var/run/AdGuardHome.pid" 9 | 10 | # Don't check for updates 11 | UPD="--no-check-update" 12 | 13 | OPTIONS="$DIR $LOG $PID $UPD" 14 | -------------------------------------------------------------------------------- /alertmanager/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=alertmanager 8 | PKG_VERSION:=0.28.1 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-03-07 13 | PKG_SOURCE_VERSION:=b2099eaa2c9ebc25edb26517cb9c732738e93910 14 | PKG_SOURCE_URL:=https://github.com/prometheus/alertmanager 15 | PKG_MIRROR_HASH:=dbb3a7d141c8ef000b66f222e03349288eb6d7d978b5e9c77751a1186ae3c1a1 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/alertmanager/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | SUBMENU:=prometheus tools 29 | TITLE:=Prometheus Alertmanager 30 | URL:=http://prometheus.io 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/alertmanager 35 | $(call Package/alertmanager/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/alertmanager_nohf 40 | $(call Package/alertmanager/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/alertmanager/description 46 | The Alertmanager handles alerts sent by client applications such 47 | as the Prometheus server. It takes care of deduplicating, grouping, 48 | and routing them to the correct receiver integrations such as email, 49 | PagerDuty, OpsGenie, or many other mechanisms thanks to the webhook 50 | receiver. It also takes care of silencing and inhibition of alerts. 51 | endef 52 | 53 | Package/alertmanager_nohf/description=$(Package/alertmanager/description) 54 | 55 | define Package/alertmanager/conffiles 56 | /opt/etc/prometheus/alertmanager.yml 57 | endef 58 | 59 | Package/alertmanager_nohf/conffiles=$(Package/alertmanager/conffiles) 60 | 61 | GO_LDFLAGS += \ 62 | -X 'github.com/prometheus/common/version.Version=v$(PKG_VERSION)' \ 63 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 64 | -X 'github.com/prometheus/common/version.Branch="release"' \ 65 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 66 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 67 | 68 | GO_TAGS:=netgo 69 | GO_TARGET:=./cmd/alertmanager ./cmd/amtool 70 | 71 | define Package/alertmanager/install 72 | $(INSTALL_DIR) $(1)/opt/bin 73 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/{alertmanager,amtool} $(1)/opt/bin 74 | $(INSTALL_DIR) $(1)/opt/etc/init.d 75 | $(INSTALL_BIN) ./files/S90alertmanager $(1)/opt/etc/init.d 76 | $(INSTALL_DIR) $(1)/opt/etc/prometheus 77 | $(CP) $(PKG_BUILD_DIR)/examples/ha/alertmanager.yml $(1)/opt/etc/prometheus 78 | endef 79 | 80 | Package/alertmanager_nohf/install=$(Package/alertmanager/install) 81 | 82 | $(eval $(call BuildPackage,alertmanager)) 83 | $(eval $(call BuildPackage,alertmanager_nohf)) 84 | -------------------------------------------------------------------------------- /alertmanager/files/S90alertmanager: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=alertmanager 5 | ARGS="--config.file=/opt/etc/prometheus/alertmanager.yml --storage.path=/opt/var/lib/alertmanager" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /chezmoi/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=chezmoi 8 | PKG_VERSION:=2.62.4 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-05-11 13 | PKG_SOURCE_VERSION:=96b8b727683f60494daa4e44d726e1bdf7201dba 14 | PKG_SOURCE_URL:=https://github.com/twpayne/chezmoi 15 | PKG_MIRROR_HASH:=aeb3cb1386a2231c024492a53b8499b654559306249bdd3f3fe0082d016ab9ea 16 | 17 | PKG_LICENSE:=MIT 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/chezmoi/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | TITLE:=Manage dotfiles 29 | URL:=https://www.chezmoi.io 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/chezmoi 34 | $(call Package/chezmoi/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/chezmoi_nohf 39 | $(call Package/chezmoi/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/chezmoi/description 45 | Manage your dotfiles across multiple diverse machines, securely. 46 | endef 47 | 48 | Package/chezmoi_nohf/description=$(Package/chezmoi/description) 49 | 50 | GO_LDFLAGS += \ 51 | -X 'main.version=v$(PKG_VERSION)' \ 52 | -X 'main.commit=$(COMMIT_SHORT)' \ 53 | -X 'main.date=$(PKG_SOURCE_DATE)' \ 54 | -X 'main.builtBy=Entware' 55 | 56 | GO_TAGS:=noupgrade 57 | 58 | define Package/chezmoi/install 59 | $(INSTALL_DIR) $(1)/opt/bin 60 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/chezmoi $(1)/opt/bin 61 | endef 62 | 63 | Package/chezmoi_nohf/install=$(Package/chezmoi/install) 64 | 65 | $(eval $(call BuildPackage,chezmoi)) 66 | $(eval $(call BuildPackage,chezmoi_nohf)) 67 | -------------------------------------------------------------------------------- /dnscrypt-proxy2/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2011-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=dnscrypt-proxy2 8 | PKG_VERSION:=2.1.8 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=67c121317701b01409279a312d4d06fd51123557 13 | PKG_SOURCE_URL:=https://github.com/DNSCrypt/dnscrypt-proxy 14 | PKG_MIRROR_HASH:=e43e0aa940065f71b923fff5c8d430de39783b11ae0cbcca17daa98f86c0dd08 15 | 16 | PKG_BUILD_PARALLEL:=1 17 | 18 | include $(INCLUDE_DIR)/package.mk 19 | include $(INCLUDE_DIR)/golang.mk 20 | 21 | define Package/dnscrypt-proxy2/Default 22 | SECTION:=net 23 | CATEGORY:=Network 24 | SUBMENU:=IP Addresses and Names 25 | TITLE:=Flexible DNS proxy with encrypted DNS protocols 26 | URL:=https://github.com/DNSCrypt/dnscrypt-proxy 27 | MAINTAINER:=Entware team, https://entware.net 28 | DEPENDS:=+ca-bundle 29 | CONFLICTS:=dnscrypt-proxy 30 | endef 31 | 32 | define Package/dnscrypt-proxy2 33 | $(call Package/dnscrypt-proxy2/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/dnscrypt-proxy2_nohf 38 | $(call Package/dnscrypt-proxy2/Default) 39 | VARIANT:=nohf 40 | DEPENDS+=@arm 41 | endef 42 | 43 | define Package/dnscrypt-proxy2/description 44 | A flexible DNS proxy, with support for modern encrypted DNS protocols 45 | such as DNSCrypt v2 and DNS-over-HTTP/2. 46 | DNSCrypt is a network protocol designed by Frank Denis and Yecheng Fu, 47 | which authenticates Domain Name System (DNS) traffic between the user's 48 | computer and recursive name servers. 49 | endef 50 | 51 | Package/dnscrypt-proxy2_nohf/description=$(Package/dnscrypt-proxy2/description) 52 | 53 | define Package/dnscrypt-proxy2/conffiles 54 | /opt/etc/dnscrypt-proxy.toml 55 | endef 56 | 57 | Package/dnscrypt-proxy2_nohf/conffiles=$(Package/dnscrypt-proxy2/conffiles) 58 | 59 | GO_BUILD_ARGS:= -mod vendor 60 | GO_TARGET:=./dnscrypt-proxy 61 | 62 | define Package/dnscrypt-proxy2/install 63 | $(INSTALL_DIR) $(1)/opt/sbin 64 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/dnscrypt-proxy $(1)/opt/sbin 65 | $(INSTALL_DIR) $(1)/opt/etc/init.d 66 | $(INSTALL_BIN) ./files/S09dnscrypt-proxy2 $(1)/opt/etc/init.d 67 | $(INSTALL_CONF) \ 68 | $(PKG_BUILD_DIR)/dnscrypt-proxy/example-dnscrypt-proxy.toml \ 69 | $(1)/opt/etc/dnscrypt-proxy.toml 70 | endef 71 | 72 | Package/dnscrypt-proxy2_nohf/install=$(Package/dnscrypt-proxy2/install) 73 | 74 | $(eval $(call BuildPackage,dnscrypt-proxy2)) 75 | $(eval $(call BuildPackage,dnscrypt-proxy2_nohf)) 76 | -------------------------------------------------------------------------------- /dnscrypt-proxy2/files/S09dnscrypt-proxy2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=dnscrypt-proxy 5 | ARGS="-config /opt/etc/dnscrypt-proxy.toml" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /filebrowser/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=filebrowser 8 | PKG_VERSION:=2.32.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=3d6c5152fe22a4a47783253a3506a2930b7b6be3 13 | PKG_SOURCE_URL:=https://github.com/filebrowser/filebrowser 14 | PKG_MIRROR_HASH:=4b74a0f53013c67fe315110856753dfcd9ed14aa1e06e7722ba574e768fabeac 15 | 16 | PKG_LICENSE:=Apache-2.0 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_DEPENDS:=node-pnpm/host 21 | PKG_BUILD_PARALLEL:=1 22 | 23 | include $(INCLUDE_DIR)/package.mk 24 | include $(INCLUDE_DIR)/golang.mk 25 | 26 | define Package/filebrowser/Default 27 | SECTION:=net 28 | CATEGORY:=Network 29 | SUBMENU:=Filesystem 30 | TITLE:=Web File Browser 31 | URL:=https://filebrowser.org 32 | endef 33 | 34 | define Package/filebrowser 35 | $(call Package/filebrowser/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/filebrowser_nohf 40 | $(call Package/filebrowser/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/filebrowser/description 46 | filebrowser provides a file managing interface within a specified 47 | directory and it can be used to upload, delete, preview, rename and edit your 48 | files. It allows the creation of multiple users and each user can have its own 49 | directory. It can be used as a standalone app or as a middleware. 50 | endef 51 | 52 | Package/filebrowser_nohf/description=$(Package/filebrowser/description) 53 | 54 | define Package/filebrowser/conffiles 55 | /opt/etc/filebrowser/filebrowser.conf 56 | endef 57 | 58 | Package/filebrowser_nohf/conffiles=$(Package/filebrowser/conffiles) 59 | 60 | GO_LDFLAGS += \ 61 | -X '$(XIMPORTPATH)/v2/version.Version=$(PKG_VERSION)' \ 62 | -X '$(XIMPORTPATH)/v2/version.CommitSHA=$(COMMIT_SHORT)' 63 | 64 | GO_VARS += \ 65 | GOGC=off \ 66 | GO111MODULE=on 67 | 68 | define Build/Compile 69 | ( cd $(PKG_BUILD_DIR)/frontend; \ 70 | XDG_DATA_HOME=$(TMP_DIR)/pnpm-cache \ 71 | pnpm install --frozen-lockfile; \ 72 | XDG_DATA_HOME=$(TMP_DIR)/pnpm-cache \ 73 | pnpm run build; \ 74 | ) 75 | $(call Build/Compile/Go) 76 | endef 77 | 78 | define Package/filebrowser/install 79 | $(INSTALL_DIR) $(1)/opt/sbin 80 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/filebrowser $(1)/opt/sbin 81 | $(INSTALL_DIR) $(1)/opt/etc/init.d 82 | $(INSTALL_BIN) ./files/S99filebrowser $(1)/opt/etc/init.d 83 | $(INSTALL_DIR) $(1)/opt/etc/filebrowser 84 | $(INSTALL_DATA) ./files/filebrowser.conf $(1)/opt/etc/filebrowser 85 | endef 86 | 87 | Package/filebrowser_nohf/install=$(Package/filebrowser/install) 88 | 89 | $(eval $(call BuildPackage,filebrowser)) 90 | $(eval $(call BuildPackage,filebrowser_nohf)) 91 | -------------------------------------------------------------------------------- /filebrowser/files/S99filebrowser: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | { [ -f "/opt/etc/filebrowser/filebrowser.conf" ] && \ 4 | . /opt/etc/filebrowser/filebrowser.conf ; } || exit 1 5 | 6 | ENABLED=yes 7 | PROCS=filebrowser 8 | ARGS="$OPTIONS" 9 | PREARGS="" 10 | DESC=$PROCS 11 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 12 | 13 | . /opt/etc/init.d/rc.func 14 | -------------------------------------------------------------------------------- /filebrowser/files/filebrowser.conf: -------------------------------------------------------------------------------- 1 | # address to listen on 2 | ADDR="-a 192.168.1.1" 3 | 4 | # port to listen on 5 | PORT="-p 8080" 6 | 7 | # database path 8 | DB="-d /opt/etc/filebrowser/filebrowser.db" 9 | 10 | # log output 11 | LOG="-l /opt/var/log/filebrowser.log" 12 | 13 | # root to prepend to relative paths 14 | ROOT="-r /opt" 15 | 16 | OPTIONS="$ADDR $PORT $DB $LOG $ROOT" 17 | -------------------------------------------------------------------------------- /filebrowser/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/cmd/root.go 2 | +++ b/cmd/root.go 3 | @@ -91,9 +91,9 @@ environment variables or configuration f 4 | If you don't set "config", it will look for a configuration file called 5 | .filebrowser.{json, toml, yaml, yml} in the following directories: 6 | 7 | -- ./ 8 | +- /opt/etc/filebrowser/ 9 | - $HOME/ 10 | -- /etc/filebrowser/ 11 | +- ./ 12 | 13 | The precedence of the configuration values are as follows: 14 | 15 | @@ -403,9 +403,9 @@ func initConfig() { 16 | if cfgFile == "" { 17 | home, err := homedir.Dir() 18 | checkErr(err) 19 | - v.AddConfigPath(".") 20 | + v.AddConfigPath("/opt/etc/filebrowser/") 21 | v.AddConfigPath(home) 22 | - v.AddConfigPath("/etc/filebrowser/") 23 | + v.AddConfigPath(".") 24 | v.SetConfigName(".filebrowser") 25 | } else { 26 | v.SetConfigFile(cfgFile) 27 | -------------------------------------------------------------------------------- /frp-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=frp 8 | PKG_VERSION:=0.62.1 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/fatedier/frp 14 | PKG_MIRROR_HASH:=50cf34716e43fcdf35e08dacc104d15c7cf7ae77c8cdfff128a0f1edf2c4ff11 15 | 16 | PKG_LICENSE:=Apache-2.0 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/frp/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=Routing and Redirection 28 | TITLE:=fast reverse proxy 29 | URL:=https://github.com/fatedier/frp 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/frp-go 34 | $(call Package/frp/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/frp-go_nohf 39 | $(call Package/frp/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/frp-go/description 45 | frp is a fast reverse proxy that allows you to expose 46 | a local server located behind a NAT or firewall to the Internet. 47 | It currently supports TCP and UDP, as well as HTTP and HTTPS protocols, 48 | enabling requests to be forwarded to internal services via domain name. 49 | frp also offers a P2P connect mode. 50 | endef 51 | 52 | Package/frp-go_nohf/description=$(Package/frp/description) 53 | 54 | define Package/frp-go/conffiles 55 | /opt/etc/frp/ 56 | endef 57 | 58 | Package/frp-go_nohf/conffiles=$(Package/frp-go/conffiles) 59 | 60 | GO_VARS += GO111MODULE=on 61 | 62 | GO_TAGS:=frpc, frps 63 | GO_TARGET:=./cmd/frpc ./cmd/frps 64 | 65 | define Package/frp-go/install 66 | $(INSTALL_DIR) $(1)/opt/bin 67 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/frp{c,s} $(1)/opt/bin 68 | $(INSTALL_DIR) $(1)/opt/etc/frp 69 | $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/*.toml $(1)/opt/etc/frp 70 | endef 71 | 72 | Package/frp-go_nohf/install=$(Package/frp/install) 73 | 74 | $(eval $(call BuildPackage,frp-go)) 75 | $(eval $(call BuildPackage,frp-go_nohf)) 76 | -------------------------------------------------------------------------------- /fzf/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=fzf 8 | PKG_VERSION:=0.62.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=d226d841a1f2b849b7e3efab2a44ecbb3e61a5a5 13 | PKG_SOURCE_URL:=https://github.com/junegunn/fzf 14 | PKG_MIRROR_HASH:=a98a9b5fc1d9f5e2df163dcc6368db60467521c6b6c40789bb0983be26712716 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/fzf/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | TITLE:=A command-line fuzzy finder 29 | URL:=https://github.com/junegunn/fzf 30 | endef 31 | 32 | define Package/fzf 33 | $(call Package/fzf/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/fzf_nohf 38 | $(call Package/fzf/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/fzf/description 44 | fzf is a general-purpose command-line fuzzy finder. 45 | endef 46 | 47 | Package/fzf_nohf/description=$(Package/fzf/description) 48 | 49 | GO_LDFLAGS += \ 50 | -X 'main.version=$(PKG_VERSION)' \ 51 | -X 'main.revision=$(COMMIT_SHORT)' 52 | 53 | define Package/fzf/install 54 | $(INSTALL_DIR) $(1)/opt/sbin 55 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/fzf $(1)/opt/sbin 56 | endef 57 | 58 | Package/fzf_nohf/install=$(Package/fzf/install) 59 | 60 | $(eval $(call BuildPackage,fzf)) 61 | $(eval $(call BuildPackage,fzf_nohf)) 62 | -------------------------------------------------------------------------------- /git-lfs/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=git-lfs 8 | PKG_VERSION:=3.6.1 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=ea47a34bde1ba1ecf9eb8dc6d44fcf7aef42f5e3 13 | PKG_SOURCE_URL:=https://github.com/git-lfs/git-lfs 14 | PKG_MIRROR_HASH:=aa3867e620d9e84bc98f6c831d52a57819212a2aff0c700a0d0d72ce81db2e75 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE.md 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/git-lfs/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=Version Control Systems 28 | TITLE:=Git Large File Storage 29 | URL:=https://git-lfs.github.com 30 | MAINTAINER:=Entware team, https://entware.net 31 | DEPENDS:=+git 32 | endef 33 | 34 | define Package/git-lfs 35 | $(call Package/git-lfs/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/git-lfs_nohf 40 | $(call Package/git-lfs/Default) 41 | VARIANT:=nohf 42 | DEPENDS+=@arm 43 | endef 44 | 45 | define Package/git-lfs/description 46 | Git Large File Storage (LFS) replaces large files such as audio samples, 47 | videos, datasets, and graphics with text pointers inside Git, while storing 48 | the file contents on a remote server like GitHub.com or GitHub Enterprise. 49 | endef 50 | 51 | Package/git-lfs_nohf/description=$(Package/git-lfs/description) 52 | 53 | define Build/Compile 54 | ( cd $(PKG_BUILD_DIR); $(GO_BIN_GENERATE) ./commands; ) 55 | $(call Build/Compile/Go) 56 | endef 57 | 58 | GO_LDFLAGS += \ 59 | -X '$(XIMPORTPATH)/v3/config.Vendor=Entware' \ 60 | -X '$(XIMPORTPATH)/v3/config.GitCommit=$(COMMIT_SHORT)' 61 | 62 | define Package/git-lfs/install 63 | $(INSTALL_DIR) $(1)/opt/bin 64 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/git-lfs $(1)/opt/bin 65 | endef 66 | 67 | Package/git-lfs_nohf/install=$(Package/git-lfs/install) 68 | 69 | $(eval $(call BuildPackage,git-lfs)) 70 | $(eval $(call BuildPackage,git-lfs_nohf)) 71 | -------------------------------------------------------------------------------- /go_env.mk: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | COMMIT_SHORT:=$(call version_abbrev,$(PKG_SOURCE_VERSION)) 6 | XIMPORTPATH:=$(shell echo $(PKG_SOURCE_URL) | cut -d/ -f3-) 7 | 8 | GOARCH:=$(subst aarch64,arm64,$(subst mipsel,mipsle,$(subst x86_64,amd64,$(ARCH)))) 9 | 10 | GO_ENV_COMMON:= \ 11 | GOCACHE=$(TMP_DIR)/go-build \ 12 | GOMODCACHE=$(DL_DIR)/go-mod-cache \ 13 | GOPATH=$(DL_DIR)/go-mod-cache \ 14 | GOTMPDIR=$(TMP_DIR) \ 15 | GOENV=off \ 16 | GOTELEMETRY=off \ 17 | GOTOOLCHAIN=local \ 18 | GOWORK=off 19 | 20 | ifeq ($(PKG_CGO_ENABLED),1) 21 | GO_VARS += CGO_ENABLED=1 22 | else 23 | GO_VARS += CGO_ENABLED=0 24 | endif 25 | 26 | # cc1: Error: -mips32r2 conflicts with the other architecture options, which imply -mips32 27 | # gcc_mipsx.S: Assembler messages: Error: invalid operands ... 28 | EXCLUDE_FLAGS = -mips16 -minterlink-mips16 -mips32r2 29 | 30 | GO_VARS += \ 31 | AR=$(TARGET_AR) \ 32 | CC=$(TARGET_CC) \ 33 | CXX=$(TARGET_CXX) \ 34 | CGO_CFLAGS="$(filter-out $(EXCLUDE_FLAGS),$(TARGET_CFLAGS))" \ 35 | CGO_CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/opt/include" \ 36 | CGO_CXXFLAGS="$(filter-out $(EXCLUDE_FLAGS),$(TARGET_CXXFLAGS))" \ 37 | CGO_FFLAGS='' \ 38 | CGO_LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/opt/lib" 39 | 40 | GO_VARS += GOOS=linux 41 | 42 | GO_VARS += GOARCH=$(GOARCH) 43 | 44 | # https://go.dev/wiki/MinimumRequirements: 45 | # "The GOARM64 environment variable defaults to v8.0." 46 | ifeq ($(ARCH),aarch64) 47 | GO_VARS += GOARM64=v8.0 48 | endif 49 | 50 | ifeq ($(ARCH),arm) 51 | ifeq ($(BUILD_VARIANT),hf) 52 | GO_VARS += GOARM=7,hardfloat 53 | ### or (?) 54 | #GO_VARS += GOARM=7 55 | #GO_VARS += GOARMFP=hard 56 | else 57 | GO_VARS += GOARM=7,softfloat 58 | ### or (?) 59 | #GO_VARS += GOARM=7 60 | #GO_VARS += GOARMFP=soft 61 | endif 62 | endif 63 | 64 | ifeq ($(ARCH),$(filter $(ARCH),mips mipsel)) 65 | GO_VARS += GOMIPS=softfloat 66 | endif 67 | 68 | GO_VARS += \ 69 | GOBIN=$(PKG_INSTALL_DIR)/bin \ 70 | $(GO_ENV_COMMON) 71 | -------------------------------------------------------------------------------- /goflow/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | # XXX Project archived by the owner on Feb 19, 2025. 6 | 7 | include $(TOPDIR)/rules.mk 8 | 9 | PKG_NAME:=goflow 10 | PKG_VERSION:=3.5.0 11 | PKG_RELEASE:=1 12 | 13 | PKG_SOURCE_PROTO:=git 14 | PKG_SOURCE_DATE:=2025-01-21 15 | PKG_SOURCE_VERSION:=8607c5af48d09b2caeb3add8eb69f7bcea9f5506 16 | PKG_SOURCE_URL:=https://github.com/cloudflare/goflow 17 | PKG_MIRROR_HASH:=73cc75f17aba13ada29440c79edb7840513719141e3cd770fcc521b3576b047d 18 | 19 | PKG_LICENSE:=BSD-3-Clause 20 | PKG_LICENSE_FILES:=LICENSE.txt 21 | 22 | PKG_BUILD_PARALLEL:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/goflow/Default 28 | SECTION:=utils 29 | CATEGORY:=Utilities 30 | SUBMENU:=prometheus tools 31 | TITLE:=a NetFlow/IPFIX/sFlow collector 32 | URL:=https://github.com/cloudflare/goflow 33 | MAINTAINER:=Entware team, https://entware.net 34 | CONFLICTS:=netflow-exporter 35 | endef 36 | 37 | define Package/cnetflow 38 | $(call Package/goflow/Default) 39 | TITLE+=(IPFIX/NetFlow v9) 40 | VARIANT:=hf 41 | endef 42 | 43 | define Package/cnetflow_nohf 44 | $(call Package/goflow/Default) 45 | TITLE+=(IPFIX/NetFlow v9) 46 | VARIANT:=nohf 47 | DEPENDS:=@arm 48 | endef 49 | 50 | define Package/cnetflow/description 51 | The high-scalability sFlow/NetFlow/IPFIX collector used 52 | internally at Cloudflare. 53 | (IPFIX/NetFlow v9) 54 | endef 55 | 56 | Package/cnetflow_nohf/description=$(Package/cnetflow/description) 57 | 58 | define Package/cnflegacy 59 | $(call Package/goflow/Default) 60 | TITLE+=(NetFlow v5) 61 | VARIANT:=hf 62 | endef 63 | 64 | define Package/cnflegacy_nohf 65 | $(call Package/goflow/Default) 66 | TITLE+=(NetFlow v5) 67 | VARIANT:=nohf 68 | DEPENDS:=@arm 69 | endef 70 | 71 | define Package/cnflegacy/description 72 | The high-scalability sFlow/NetFlow/IPFIX collector used 73 | internally at Cloudflare. 74 | (NetFlow v5) 75 | endef 76 | 77 | Package/cnflegacy_nohf/description=$(Package/cnflegacy/description) 78 | 79 | define Package/csflow 80 | $(call Package/goflow/Default) 81 | TITLE+=(sFlow v5) 82 | VARIANT:=hf 83 | endef 84 | 85 | define Package/csflow_nohf 86 | $(call Package/goflow/Default) 87 | TITLE+=(sFlow v5) 88 | VARIANT:=nohf 89 | DEPENDS:=@arm 90 | endef 91 | 92 | define Package/csflow/description 93 | The high-scalability sFlow/NetFlow/IPFIX collector used 94 | internally at Cloudflare. 95 | (sFlow v5) 96 | endef 97 | 98 | Package/csflow_nohf/description=$(Package/csflow/description) 99 | 100 | define Package/goflow 101 | $(call Package/goflow/Default) 102 | TITLE+=(full) 103 | VARIANT:=hf 104 | endef 105 | 106 | define Package/goflow_nohf 107 | $(call Package/goflow/Default) 108 | TITLE+=(full) 109 | VARIANT:=nohf 110 | DEPENDS:=@arm 111 | endef 112 | 113 | define Package/goflow/description 114 | The high-scalability sFlow/NetFlow/IPFIX collector used 115 | internally at Cloudflare. 116 | (full) 117 | endef 118 | 119 | Package/goflow_nohf/description=$(Package/goflow/description) 120 | 121 | GO_LDFLAGS += \ 122 | -X 'main.version=$(PKG_VERSION)' \ 123 | -X 'main.buildinfos=$(PKG_SOURCE_DATE)' 124 | 125 | GO_TARGET:=./cmd/... 126 | 127 | define Package/cnetflow/install 128 | $(INSTALL_DIR) $(1)/opt/bin 129 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/cnetflow $(1)/opt/bin 130 | $(INSTALL_DIR) $(1)/opt/etc/init.d 131 | $(INSTALL_BIN) ./files/S99cnetflow $(1)/opt/etc/init.d 132 | endef 133 | 134 | Package/cnetflow_nohf/install=$(Package/cnetflow/install) 135 | 136 | define Package/cnflegacy/install 137 | $(INSTALL_DIR) $(1)/opt/bin 138 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/cnflegacy $(1)/opt/bin 139 | $(INSTALL_DIR) $(1)/opt/etc/init.d 140 | $(INSTALL_BIN) ./files/S99cnflegacy $(1)/opt/etc/init.d 141 | endef 142 | 143 | Package/cnflegacy_nohf/install=$(Package/cnflegacy/install) 144 | 145 | define Package/csflow/install 146 | $(INSTALL_DIR) $(1)/opt/bin 147 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/csflow $(1)/opt/bin 148 | $(INSTALL_DIR) $(1)/opt/etc/init.d 149 | $(INSTALL_BIN) ./files/S99csflow $(1)/opt/etc/init.d 150 | endef 151 | 152 | Package/csflow_nohf/install=$(Package/csflow/install) 153 | 154 | define Package/goflow/install 155 | $(INSTALL_DIR) $(1)/opt/bin 156 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/goflow $(1)/opt/bin 157 | $(INSTALL_DIR) $(1)/opt/etc/init.d 158 | $(INSTALL_BIN) ./files/S99goflow $(1)/opt/etc/init.d 159 | endef 160 | 161 | Package/goflow_nohf/install=$(Package/goflow/install) 162 | 163 | $(eval $(call BuildPackage,cnetflow)) 164 | $(eval $(call BuildPackage,cnetflow_nohf)) 165 | $(eval $(call BuildPackage,cnflegacy)) 166 | $(eval $(call BuildPackage,cnflegacy_nohf)) 167 | $(eval $(call BuildPackage,csflow)) 168 | $(eval $(call BuildPackage,csflow_nohf)) 169 | $(eval $(call BuildPackage,goflow)) 170 | $(eval $(call BuildPackage,goflow_nohf)) 171 | -------------------------------------------------------------------------------- /goflow/files/S99cnetflow: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=cnetflow 5 | ARGS="-kafka=false" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /goflow/files/S99cnflegacy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=cnflegacy 5 | ARGS="-kafka=false" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /goflow/files/S99csflow: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=csflow 5 | ARGS="-kafka=false" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /goflow/files/S99goflow: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=goflow 5 | ARGS="-kafka=false -nfl=false -sflow=false" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /gost-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=gost-go 8 | PKG_VERSION:=3.0.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/go-gost/gost 14 | PKG_MIRROR_HASH:=0a417befd0b8cfa9c46d65125610df40519aac403664ea37f0ad8f9a6e8330e2 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/gost-go/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=VPN 28 | TITLE:=GO Simple Tunnel 29 | URL:=https://gost.run 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/gost-go 34 | $(call Package/gost-go/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/gost-go_nohf 39 | $(call Package/gost-go/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/gost-go/description 45 | GO Simple Tunnel - a simple tunnel written in golang. 46 | endef 47 | 48 | Package/gost-go_nohf/description=$(Package/gost-go/description) 49 | 50 | GO_TARGET:=./cmd/gost 51 | 52 | define Package/gost-go/install 53 | $(INSTALL_DIR) $(1)/opt/bin 54 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/gost $(1)/opt/bin/ 55 | endef 56 | 57 | Package/gost-go_nohf/install=$(Package/gost-go/install) 58 | 59 | $(eval $(call BuildPackage,gost-go)) 60 | $(eval $(call BuildPackage,gost-go_nohf)) 61 | -------------------------------------------------------------------------------- /grafana/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=grafana 8 | PKG_VERSION:=10.4.18 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-04-25 13 | PKG_SOURCE_VERSION:=a33fc073bf8b395da943a32c08a1217f7a7a30e0 14 | PKG_SOURCE_URL:=https://github.com/grafana/grafana 15 | PKG_MIRROR_HASH:=39d77626c767006ebb2eedd298ff0b20382421096992f8373ea429c5e5212ec2 16 | 17 | PKG_LICENSE:=AGPL-3.0-only 18 | PKG_LICENSE_FILES:=LICENSE LICENSING.md 19 | 20 | PKG_BUILD_DEPENDS:=node-yarn/host 21 | PKG_BUILD_PARALLEL:=1 22 | PKG_CGO_ENABLED:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/grafana/Default 28 | SECTION:=utils 29 | CATEGORY:=Utilities 30 | SUBMENU:=prometheus tools 31 | TITLE:=platform for monitoring and observability 32 | URL:=https://grafana.com 33 | MAINTAINER:=Entware team, https://entware.net 34 | endef 35 | 36 | define Package/grafana 37 | $(call Package/grafana/Default) 38 | VARIANT:=hf 39 | endef 40 | 41 | define Package/grafana_nohf 42 | $(call Package/grafana/Default) 43 | VARIANT:=nohf 44 | DEPENDS:=@arm 45 | endef 46 | 47 | define Package/grafana/description 48 | The open and composable observability and data visualization 49 | platform. Visualize metrics, logs, and traces from multiple sources like 50 | Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more. 51 | endef 52 | 53 | Package/grafana_nohf/description=$(Package/grafana/description) 54 | 55 | GO_LDFLAGS += \ 56 | -X 'main.version=$(PKG_VERSION)' \ 57 | -X 'main.commit=$(COMMIT_SHORT)' \ 58 | -X 'main.buildstamp=$(PKG_SOURCE_DATE)' \ 59 | -X 'main.buildBranch=v10.4.x' 60 | 61 | GO_TARGET:=./pkg/cmd/grafana ./pkg/cmd/grafana-cli ./pkg/cmd/grafana-server 62 | 63 | define Build/Deps 64 | # install frontend dependencies 65 | ( cd $(PKG_BUILD_DIR); \ 66 | YARN_ENABLE_PROGRESS_BARS=false YARN_CHECKSUM_BEHAVIOR=update \ 67 | HTTP_PROXY=localhost yarn install --immutable; \ 68 | ) 69 | # wire-host 70 | ( cd $(PKG_BUILD_DIR)/.bingo; \ 71 | $(GO_ENV_COMMON) $(GO_BIN) build -mod=mod -modfile=wire.mod \ 72 | -o=$(PKG_BUILD_DIR)/wire-host "github.com/google/wire/cmd/wire"; \ 73 | ) 74 | # generate code from .cue files 75 | ( cd $(PKG_BUILD_DIR); \ 76 | for t in \ 77 | ./pkg/plugins/plugindef \ 78 | ./kinds/gen.go \ 79 | ./public/app/plugins/gen.go \ 80 | ./pkg/kindsysreport/codegen/report.go; do \ 81 | $(GO_BIN_GENERATE) $$$$t; \ 82 | done; \ 83 | ) 84 | # generate go files 85 | ( cd $(PKG_BUILD_DIR); \ 86 | $(GO_ENV_COMMON) $(PKG_BUILD_DIR)/wire-host gen -tags "oss" ./pkg/server; \ 87 | ) 88 | endef 89 | 90 | define Build/Web 91 | # build frontend 92 | # FIXME JavaScript heap out of memory 93 | ( cd $(PKG_BUILD_DIR); \ 94 | NODE_OPTIONS=--max_old_space_size=8000 yarn run build; \ 95 | ) 96 | ( cd $(PKG_BUILD_DIR)/plugins-bundled/internal/input-datasource; \ 97 | yarn run build; \ 98 | ) 99 | endef 100 | 101 | define Build/Compile 102 | $(call Build/Deps) 103 | $(call Build/Web) 104 | $(call Build/Compile/Go) 105 | endef 106 | 107 | define Package/grafana/install 108 | $(INSTALL_DIR) $(1)/opt/bin 109 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/grafana{,-cli,-server} $(1)/opt/bin 110 | $(INSTALL_DIR) $(1)/opt/etc/grafana 111 | $(CP) $(PKG_BUILD_DIR)/conf/sample.ini $(1)/opt/etc/grafana/grafana.ini 112 | $(CP) $(PKG_BUILD_DIR)/conf/ldap.toml $(1)/opt/etc/grafana 113 | $(CP) $(PKG_BUILD_DIR)/conf/provisioning $(1)/opt/etc/grafana 114 | $(INSTALL_DIR) $(1)/opt/etc/init.d 115 | $(INSTALL_BIN) ./files/S80grafana $(1)/opt/etc/init.d 116 | $(INSTALL_DIR) $(1)/opt/share/grafana 117 | $(CP) $(PKG_BUILD_DIR)/{conf,public} $(1)/opt/share/grafana 118 | $(INSTALL_DIR) $(1)/opt/share/grafana/plugins-bundled/internal/input-datasource 119 | $(CP) $(PKG_BUILD_DIR)/plugins-bundled/internal/input-datasource/dist/* \ 120 | $(1)/opt/share/grafana/plugins-bundled/internal/input-datasource 121 | # XXX remove *.map 122 | $(FIND) $(1)/opt/share/grafana -type f -a -iname "*.map" -delete 123 | $(INSTALL_DIR) $(1)/opt/var/lib/grafana/plugins 124 | $(INSTALL_DIR) $(1)/opt/var/log/grafana 125 | endef 126 | 127 | Package/grafana_nohf/install=$(Package/grafana/install) 128 | 129 | $(eval $(call BuildPackage,grafana)) 130 | $(eval $(call BuildPackage,grafana_nohf)) 131 | -------------------------------------------------------------------------------- /grafana/files/S80grafana: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CONFIG=/opt/etc/grafana/grafana.ini 4 | HOMEPATH=/opt/share/grafana 5 | PIDFILE=/opt/var/run/grafana.pid 6 | 7 | ENABLED=yes 8 | PROCS=grafana 9 | ARGS="server -config=$CONFIG -homepath $HOMEPATH -pidfile $PIDFILE" 10 | PREARGS="" 11 | DESC="Grafana Server" 12 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 13 | 14 | . /opt/etc/init.d/rc.func 15 | -------------------------------------------------------------------------------- /grafana/patches/010-fix-conf.patch: -------------------------------------------------------------------------------- 1 | --- a/conf/defaults.ini 2 | +++ b/conf/defaults.ini 3 | @@ -16,19 +16,19 @@ force_migration = false 4 | #################################### Paths ############################### 5 | [paths] 6 | # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) 7 | -data = data 8 | +data = /opt/var/lib/grafana 9 | 10 | # Temporary files in `data` directory older than given duration will be removed 11 | temp_data_lifetime = 24h 12 | 13 | # Directory where grafana can store logs 14 | -logs = data/log 15 | +logs = /opt/var/log/grafana 16 | 17 | # Directory where grafana will automatically scan and look for plugins 18 | -plugins = data/plugins 19 | +plugins = /opt/var/lib/grafana/plugins 20 | 21 | # folder that contains provisioning config files that grafana will apply on startup and while running. 22 | -provisioning = conf/provisioning 23 | +provisioning = /opt/etc/grafana/provisioning 24 | 25 | #################################### Server ############################## 26 | [server] 27 | @@ -80,7 +80,7 @@ socket_gid = -1 28 | socket_mode = 0660 29 | 30 | # Unix socket path 31 | -socket = /tmp/grafana.sock 32 | +socket = /opt/var/run/grafana.sock 33 | 34 | # CDN Url 35 | cdn_url = 36 | @@ -861,7 +861,7 @@ skip_org_role_sync = false 37 | #################################### Auth LDAP ########################### 38 | [auth.ldap] 39 | enabled = false 40 | -config_file = /etc/grafana/ldap.toml 41 | +config_file = /opt/etc/grafana/ldap.toml 42 | allow_sign_up = true 43 | skip_org_role_sync = false 44 | 45 | -------------------------------------------------------------------------------- /grpcurl/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=grpcurl 8 | PKG_VERSION:=1.9.3 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/fullstorydev/grpcurl 14 | PKG_MIRROR_HASH:=4c8922fd1bc07e7b93bc68f34744ed47cc48754e488a24fd42542393a43b1091 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/grpcurl/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | TITLE:=CLI tool to interact with gRPC servers 29 | URL:=https://github.com/fullstorydev/grpcurl 30 | endef 31 | 32 | define Package/grpcurl 33 | $(call Package/grpcurl/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/grpcurl_nohf 38 | $(call Package/grpcurl/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/grpcurl/description 44 | grpcurl is a command-line tool that lets you interact with gRPC servers. 45 | It's basically curl for gRPC servers. 46 | endef 47 | 48 | Package/grpcurl_nohf/description=$(Package/grpcurl/description) 49 | 50 | GO_LDFLAGS += \ 51 | -X 'main.version=$(PKG_VERSION)' 52 | 53 | GO_TARGET:=./cmd/grpcurl 54 | 55 | define Package/grpcurl/install 56 | $(INSTALL_DIR) $(1)/opt/sbin 57 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/grpcurl $(1)/opt/sbin/grpcurl 58 | endef 59 | 60 | Package/grpcurl_nohf/install=$(Package/grpcurl/install) 61 | 62 | $(eval $(call BuildPackage,grpcurl)) 63 | $(eval $(call BuildPackage,grpcurl_nohf)) 64 | -------------------------------------------------------------------------------- /headscale/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=headscale 8 | PKG_VERSION:=v0.26.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/juanfont/headscale 14 | PKG_MIRROR_HASH:=0aaf6c2ade99b1cb629640a56be2ff62809e3b32308239fb863a70e3e580da64 15 | 16 | PKG_LICENSE:=BSD-3-Clause 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/headscale/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=VPN 28 | TITLE:=Tailscale control server 29 | URL:=https://github.com/juanfont/headscale 30 | MAINTAINER:=Entware team, https://entware.net 31 | DEPENDS:=+ca-bundle @!(mips||mipsel) 32 | endef 33 | 34 | define Package/headscale 35 | $(call Package/headscale/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/headscale_nohf 40 | $(call Package/headscale/Default) 41 | VARIANT:=nohf 42 | DEPENDS+=@arm 43 | endef 44 | 45 | define Package/headscale/description 46 | Headscale aims to implement a self-hosted, open source alternative 47 | to the Tailscale control server. Headscale's goal is to provide self-hosters 48 | and hobbyists with an open-source server they can use for their projects and 49 | labs. It implements a narrow scope, a single Tailnet, suitable for a personal 50 | use, or a small open-source organisation. 51 | endef 52 | 53 | Package/headscale_nohf/description=$(Package/headscale/description) 54 | 55 | define Package/headscale/conffiles 56 | /opt/etc/headscale/config.yaml 57 | endef 58 | 59 | Package/headscale_nohf/conffiles=$(Package/headscale/conffiles) 60 | 61 | GO_LDFLAGS += \ 62 | -X '$(XIMPORTPATH)/cmd/headscale/cli.Version=$(PKG_VERSION)' 63 | 64 | GO_BUILD_ARGS += -a 65 | 66 | GO_TARGET:=./cmd/headscale 67 | 68 | define Package/headscale/install 69 | $(INSTALL_DIR) $(1)/opt/bin 70 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/headscale $(1)/opt/bin 71 | $(INSTALL_DIR) $(1)/opt/etc/headscale 72 | $(CP) $(PKG_BUILD_DIR)/config-example.yaml $(1)/opt/etc/headscale/config.yaml 73 | $(INSTALL_DIR) $(1)/opt/etc/init.d 74 | $(INSTALL_BIN) ./files/S07headscale $(1)/opt/etc/init.d 75 | $(INSTALL_DIR) $(1)/opt/var/{lib,run}/headscale 76 | endef 77 | 78 | Package/headscale_nohf/install=$(Package/headscale/install) 79 | 80 | $(eval $(call BuildPackage,headscale)) 81 | $(eval $(call BuildPackage,headscale_nohf)) 82 | -------------------------------------------------------------------------------- /headscale/files/S07headscale: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=headscale 5 | ARGS="serve" 6 | PREARGS="" 7 | DESC="$PROCS" 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /headscale/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/cmd/headscale/cli/dump_config.go 2 | +++ b/cmd/headscale/cli/dump_config.go 3 | @@ -13,13 +13,13 @@ func init() { 4 | 5 | var dumpConfigCmd = &cobra.Command{ 6 | Use: "dumpConfig", 7 | - Short: "dump current config to /etc/headscale/config.dump.yaml, integration test only", 8 | + Short: "dump current config to /opt/etc/headscale/config.dump.yaml, integration test only", 9 | Hidden: true, 10 | Args: func(cmd *cobra.Command, args []string) error { 11 | return nil 12 | }, 13 | Run: func(cmd *cobra.Command, args []string) { 14 | - err := viper.WriteConfigAs("/etc/headscale/config.dump.yaml") 15 | + err := viper.WriteConfigAs("/opt/etc/headscale/config.dump.yaml") 16 | if err != nil { 17 | //nolint 18 | fmt.Println("Failed to dump config") 19 | --- a/cmd/headscale/cli/root.go 20 | +++ b/cmd/headscale/cli/root.go 21 | @@ -33,7 +33,7 @@ func init() { 22 | 23 | cobra.OnInitialize(initConfig) 24 | rootCmd.PersistentFlags(). 25 | - StringVarP(&cfgFile, "config", "c", "", "config file (default is /etc/headscale/config.yaml)") 26 | + StringVarP(&cfgFile, "config", "c", "", "config file (default is /opt/etc/headscale/config.yaml)") 27 | rootCmd.PersistentFlags(). 28 | StringP("output", "o", "", "Output format. Empty for human-readable, 'json', 'json-line' or 'yaml'") 29 | rootCmd.PersistentFlags(). 30 | --- a/cmd/headscale/headscale_test.go 31 | +++ b/cmd/headscale/headscale_test.go 32 | @@ -58,7 +58,7 @@ func (*Suite) TestConfigFileLoading(c *c 33 | c.Assert(viper.GetString("listen_addr"), check.Equals, "127.0.0.1:8080") 34 | c.Assert(viper.GetString("metrics_listen_addr"), check.Equals, "127.0.0.1:9090") 35 | c.Assert(viper.GetString("database.type"), check.Equals, "sqlite") 36 | - c.Assert(viper.GetString("database.sqlite.path"), check.Equals, "/var/lib/headscale/db.sqlite") 37 | + c.Assert(viper.GetString("database.sqlite.path"), check.Equals, "/opt/var/lib/headscale/db.sqlite") 38 | c.Assert(viper.GetString("tls_letsencrypt_hostname"), check.Equals, "") 39 | c.Assert(viper.GetString("tls_letsencrypt_listen"), check.Equals, ":http") 40 | c.Assert(viper.GetString("tls_letsencrypt_challenge_type"), check.Equals, "HTTP-01") 41 | @@ -100,7 +100,7 @@ func (*Suite) TestConfigLoading(c *check 42 | c.Assert(viper.GetString("listen_addr"), check.Equals, "127.0.0.1:8080") 43 | c.Assert(viper.GetString("metrics_listen_addr"), check.Equals, "127.0.0.1:9090") 44 | c.Assert(viper.GetString("database.type"), check.Equals, "sqlite") 45 | - c.Assert(viper.GetString("database.sqlite.path"), check.Equals, "/var/lib/headscale/db.sqlite") 46 | + c.Assert(viper.GetString("database.sqlite.path"), check.Equals, "/opt/var/lib/headscale/db.sqlite") 47 | c.Assert(viper.GetString("tls_letsencrypt_hostname"), check.Equals, "") 48 | c.Assert(viper.GetString("tls_letsencrypt_listen"), check.Equals, ":http") 49 | c.Assert(viper.GetString("tls_letsencrypt_challenge_type"), check.Equals, "HTTP-01") 50 | --- a/hscontrol/types/config.go 51 | +++ b/hscontrol/types/config.go 52 | @@ -265,9 +265,9 @@ func LoadConfig(path string, isFile bool 53 | } else { 54 | viper.SetConfigName("config") 55 | if path == "" { 56 | - viper.AddConfigPath("/etc/headscale/") 57 | + viper.AddConfigPath("/opt/etc/headscale/") 58 | viper.AddConfigPath("$HOME/.headscale") 59 | - viper.AddConfigPath(".") 60 | + // viper.AddConfigPath(".") 61 | } else { 62 | // For testing 63 | viper.AddConfigPath(path) 64 | @@ -281,7 +281,7 @@ func LoadConfig(path string, isFile bool 65 | 66 | viper.SetDefault("policy.mode", "file") 67 | 68 | - viper.SetDefault("tls_letsencrypt_cache_dir", "/var/www/.cache") 69 | + viper.SetDefault("tls_letsencrypt_cache_dir", "/opt/var/cache") 70 | viper.SetDefault("tls_letsencrypt_challenge_type", HTTP01ChallengeType) 71 | 72 | viper.SetDefault("log.level", "info") 73 | @@ -298,7 +298,7 @@ func LoadConfig(path string, isFile bool 74 | viper.SetDefault("derp.server.stun.enabled", true) 75 | viper.SetDefault("derp.server.automatically_add_embedded_derp_region", true) 76 | 77 | - viper.SetDefault("unix_socket", "/var/run/headscale/headscale.sock") 78 | + viper.SetDefault("unix_socket", "/opt/var/run/headscale/headscale.sock") 79 | viper.SetDefault("unix_socket_permission", "0o770") 80 | 81 | viper.SetDefault("grpc_listen_addr", ":50443") 82 | --- a/integration/hsic/config.go 83 | +++ b/integration/hsic/config.go 84 | @@ -4,9 +4,9 @@ import "github.com/juanfont/headscale/hs 85 | 86 | func MinimumConfigYAML() string { 87 | return ` 88 | -private_key_path: /tmp/private.key 89 | +private_key_path: /opt/tmp/private.key 90 | noise: 91 | - private_key_path: /tmp/noise_private.key 92 | + private_key_path: /opt/tmp/noise_private.key 93 | ` 94 | } 95 | 96 | @@ -15,7 +15,7 @@ func DefaultConfigEnv() map[string]strin 97 | "HEADSCALE_LOG_LEVEL": "trace", 98 | "HEADSCALE_POLICY_PATH": "", 99 | "HEADSCALE_DATABASE_TYPE": "sqlite", 100 | - "HEADSCALE_DATABASE_SQLITE_PATH": "/tmp/integration_test_db.sqlite3", 101 | + "HEADSCALE_DATABASE_SQLITE_PATH": "/opt/tmp/integration_test_db.sqlite3", 102 | "HEADSCALE_DATABASE_DEBUG": "0", 103 | "HEADSCALE_DATABASE_GORM_SLOW_THRESHOLD": "1", 104 | "HEADSCALE_EPHEMERAL_NODE_INACTIVITY_TIMEOUT": "30m", 105 | @@ -25,8 +25,8 @@ func DefaultConfigEnv() map[string]strin 106 | "HEADSCALE_DNS_MAGIC_DNS": "true", 107 | "HEADSCALE_DNS_OVERRIDE_LOCAL_DNS": "false", 108 | "HEADSCALE_DNS_NAMESERVERS_GLOBAL": "127.0.0.11 1.1.1.1", 109 | - "HEADSCALE_PRIVATE_KEY_PATH": "/tmp/private.key", 110 | - "HEADSCALE_NOISE_PRIVATE_KEY_PATH": "/tmp/noise_private.key", 111 | + "HEADSCALE_PRIVATE_KEY_PATH": "/opt/tmp/private.key", 112 | + "HEADSCALE_NOISE_PRIVATE_KEY_PATH": "/opt/tmp/noise_private.key", 113 | "HEADSCALE_METRICS_LISTEN_ADDR": "0.0.0.0:9090", 114 | "HEADSCALE_DERP_URLS": "https://controlplane.tailscale.com/derpmap/default", 115 | "HEADSCALE_DERP_AUTO_UPDATE_ENABLED": "false", 116 | --- a/integration/hsic/hsic.go 117 | +++ b/integration/hsic/hsic.go 118 | @@ -34,10 +34,10 @@ import ( 119 | const ( 120 | hsicHashLength = 6 121 | dockerContextPath = "../." 122 | - caCertRoot = "/usr/local/share/ca-certificates" 123 | - aclPolicyPath = "/etc/headscale/acl.hujson" 124 | - tlsCertPath = "/etc/headscale/tls.cert" 125 | - tlsKeyPath = "/etc/headscale/tls.key" 126 | + caCertRoot = "/opt/share/ca-certificates" 127 | + aclPolicyPath = "/opt/etc/headscale/acl.hujson" 128 | + tlsCertPath = "/opt/etc/headscale/tls.cert" 129 | + tlsKeyPath = "/opt/etc/headscale/tls.key" 130 | headscaleDefaultPort = 8080 131 | IntegrationTestDockerFileName = "Dockerfile.integration" 132 | ) 133 | @@ -222,7 +222,7 @@ func WithEmbeddedDERPServerOnly() Option 134 | hsic.env["HEADSCALE_DERP_SERVER_REGION_CODE"] = "headscale" 135 | hsic.env["HEADSCALE_DERP_SERVER_REGION_NAME"] = "Headscale Embedded DERP" 136 | hsic.env["HEADSCALE_DERP_SERVER_STUN_LISTEN_ADDR"] = "0.0.0.0:3478" 137 | - hsic.env["HEADSCALE_DERP_SERVER_PRIVATE_KEY_PATH"] = "/tmp/derp.key" 138 | + hsic.env["HEADSCALE_DERP_SERVER_PRIVATE_KEY_PATH"] = "/opt/tmp/derp.key" 139 | 140 | // Envknob for enabling DERP debug logs 141 | hsic.env["DERP_DEBUG_LOGS"] = "true" 142 | @@ -241,10 +241,10 @@ func WithDERPConfig(derpMap tailcfg.DERP 143 | return 144 | } 145 | 146 | - hsic.env["HEADSCALE_DERP_PATHS"] = "/etc/headscale/derp.yml" 147 | + hsic.env["HEADSCALE_DERP_PATHS"] = "/opt/etc/headscale/derp.yml" 148 | hsic.filesInContainer = append(hsic.filesInContainer, 149 | fileInContainer{ 150 | - path: "/etc/headscale/derp.yml", 151 | + path: "/opt/etc/headscale/derp.yml", 152 | contents: contents, 153 | }) 154 | 155 | @@ -339,8 +339,8 @@ func New( 156 | 157 | env := []string{ 158 | "HEADSCALE_DEBUG_PROFILING_ENABLED=1", 159 | - "HEADSCALE_DEBUG_PROFILING_PATH=/tmp/profile", 160 | - "HEADSCALE_DEBUG_DUMP_MAPRESPONSE_PATH=/tmp/mapresponses", 161 | + "HEADSCALE_DEBUG_PROFILING_PATH=/opt/tmp/profile", 162 | + "HEADSCALE_DEBUG_DUMP_MAPRESPONSE_PATH=/opt/tmp/mapresponses", 163 | "HEADSCALE_DEBUG_DEADLOCK=1", 164 | "HEADSCALE_DEBUG_DEADLOCK_TIMEOUT=5s", 165 | "HEADSCALE_DEBUG_HIGH_CARDINALITY_METRICS=1", 166 | @@ -369,7 +369,7 @@ func New( 167 | // Cmd: []string{"headscale", "serve"}, 168 | // TODO(kradalby): Get rid of this hack, we currently need to give us some 169 | // to inject the headscale configuration further down. 170 | - Entrypoint: []string{"/bin/bash", "-c", "/bin/sleep 3 ; update-ca-certificates ; headscale serve ; /bin/sleep 30"}, 171 | + Entrypoint: []string{"/bin/sh", "-c", "sleep 3 ; update-ca-certificates ; headscale serve ; sleep 30"}, 172 | Env: env, 173 | } 174 | 175 | @@ -415,7 +415,7 @@ func New( 176 | } 177 | } 178 | 179 | - err = hsic.WriteFile("/etc/headscale/config.yaml", []byte(MinimumConfigYAML())) 180 | + err = hsic.WriteFile("/opt/etc/headscale/config.yaml", []byte(MinimumConfigYAML())) 181 | if err != nil { 182 | return nil, fmt.Errorf("failed to write headscale config to container: %w", err) 183 | } 184 | @@ -467,7 +467,7 @@ func (t *HeadscaleInContainer) hasTLS() 185 | 186 | // Shutdown stops and cleans up the Headscale container. 187 | func (t *HeadscaleInContainer) Shutdown() (string, string, error) { 188 | - stdoutPath, stderrPath, err := t.SaveLog("/tmp/control") 189 | + stdoutPath, stderrPath, err := t.SaveLog("/opt/tmp/control") 190 | if err != nil { 191 | log.Printf( 192 | "Failed to save log from control: %s", 193 | @@ -475,7 +475,7 @@ func (t *HeadscaleInContainer) Shutdown( 194 | ) 195 | } 196 | 197 | - err = t.SaveMetrics(fmt.Sprintf("/tmp/control/%s_metrics.txt", t.hostname)) 198 | + err = t.SaveMetrics(fmt.Sprintf("/opt/tmp/control/%s_metrics.txt", t.hostname)) 199 | if err != nil { 200 | log.Printf( 201 | "Failed to metrics from control: %s", 202 | @@ -494,7 +494,7 @@ func (t *HeadscaleInContainer) Shutdown( 203 | ) 204 | } 205 | 206 | - err = t.SaveProfile("/tmp/control") 207 | + err = t.SaveProfile("/opt/tmp/control") 208 | if err != nil { 209 | log.Printf( 210 | "Failed to save profile from control: %s", 211 | @@ -502,7 +502,7 @@ func (t *HeadscaleInContainer) Shutdown( 212 | ) 213 | } 214 | 215 | - err = t.SaveMapResponses("/tmp/control") 216 | + err = t.SaveMapResponses("/opt/tmp/control") 217 | if err != nil { 218 | log.Printf( 219 | "Failed to save mapresponses from control: %s", 220 | @@ -512,7 +512,7 @@ func (t *HeadscaleInContainer) Shutdown( 221 | 222 | // We dont have a database to save if we use postgres 223 | if !t.postgres { 224 | - err = t.SaveDatabase("/tmp/control") 225 | + err = t.SaveDatabase("/opt/tmp/control") 226 | if err != nil { 227 | log.Printf( 228 | "Failed to save database from control: %s", 229 | @@ -561,7 +561,7 @@ func (t *HeadscaleInContainer) SaveMetri 230 | } 231 | 232 | func (t *HeadscaleInContainer) SaveProfile(savePath string) error { 233 | - tarFile, err := t.FetchPath("/tmp/profile") 234 | + tarFile, err := t.FetchPath("/opt/tmp/profile") 235 | if err != nil { 236 | return err 237 | } 238 | @@ -579,7 +579,7 @@ func (t *HeadscaleInContainer) SaveProfi 239 | } 240 | 241 | func (t *HeadscaleInContainer) SaveMapResponses(savePath string) error { 242 | - tarFile, err := t.FetchPath("/tmp/mapresponses") 243 | + tarFile, err := t.FetchPath("/opt/tmp/mapresponses") 244 | if err != nil { 245 | return err 246 | } 247 | @@ -597,7 +597,7 @@ func (t *HeadscaleInContainer) SaveMapRe 248 | } 249 | 250 | func (t *HeadscaleInContainer) SaveDatabase(savePath string) error { 251 | - tarFile, err := t.FetchPath("/tmp/integration_test_db.sqlite3") 252 | + tarFile, err := t.FetchPath("/opt/tmp/integration_test_db.sqlite3") 253 | if err != nil { 254 | return err 255 | } 256 | --- a/integration/tsic/tsic.go 257 | +++ b/integration/tsic/tsic.go 258 | @@ -35,7 +35,7 @@ const ( 259 | defaultPingTimeout = 300 * time.Millisecond 260 | defaultPingCount = 10 261 | dockerContextPath = "../." 262 | - caCertRoot = "/usr/local/share/ca-certificates" 263 | + caCertRoot = "/opt/share/ca-certificates" 264 | dockerExecuteTimeout = 60 * time.Second 265 | ) 266 | 267 | @@ -228,7 +228,7 @@ func New( 268 | withEntrypoint: []string{ 269 | "/bin/sh", 270 | "-c", 271 | - "/bin/sleep 3 ; update-ca-certificates ; tailscaled --tun=tsdev --verbose=10", 272 | + "sleep 3 ; update-ca-certificates ; tailscaled --tun=tsdev --verbose=10", 273 | }, 274 | } 275 | 276 | @@ -360,7 +360,7 @@ func New( 277 | 278 | // Shutdown stops and cleans up the Tailscale container. 279 | func (t *TailscaleInContainer) Shutdown() (string, string, error) { 280 | - stdoutPath, stderrPath, err := t.SaveLog("/tmp/control") 281 | + stdoutPath, stderrPath, err := t.SaveLog("/opt/tmp/control") 282 | if err != nil { 283 | log.Printf( 284 | "Failed to save log from %s: %s", 285 | @@ -640,9 +640,9 @@ func (t *TailscaleInContainer) Status(sa 286 | return nil, fmt.Errorf("failed to unmarshal tailscale status: %w", err) 287 | } 288 | 289 | - err = os.WriteFile(fmt.Sprintf("/tmp/control/%s_status.json", t.hostname), []byte(result), 0o755) 290 | + err = os.WriteFile(fmt.Sprintf("/opt/tmp/control/%s_status.json", t.hostname), []byte(result), 0o755) 291 | if err != nil { 292 | - return nil, fmt.Errorf("status netmap to /tmp/control: %w", err) 293 | + return nil, fmt.Errorf("status netmap to /opt/tmp/control: %w", err) 294 | } 295 | 296 | return &status, err 297 | @@ -699,9 +699,9 @@ func (t *TailscaleInContainer) Netmap() 298 | return nil, fmt.Errorf("failed to unmarshal tailscale netmap: %w", err) 299 | } 300 | 301 | - err = os.WriteFile(fmt.Sprintf("/tmp/control/%s_netmap.json", t.hostname), []byte(result), 0o755) 302 | + err = os.WriteFile(fmt.Sprintf("/opt/tmp/control/%s_netmap.json", t.hostname), []byte(result), 0o755) 303 | if err != nil { 304 | - return nil, fmt.Errorf("saving netmap to /tmp/control: %w", err) 305 | + return nil, fmt.Errorf("saving netmap to /opt/tmp/control: %w", err) 306 | } 307 | 308 | return &nm, err 309 | -------------------------------------------------------------------------------- /headscale/patches/020-config.patch: -------------------------------------------------------------------------------- 1 | --- a/config-example.yaml 2 | +++ b/config-example.yaml 3 | @@ -44,7 +44,7 @@ noise: 4 | # The Noise private key is used to encrypt the traffic between headscale and 5 | # Tailscale clients when using the new Noise-based protocol. A missing key 6 | # will be automatically generated. 7 | - private_key_path: /var/lib/headscale/noise_private.key 8 | + private_key_path: /opt/var/lib/headscale/noise_private.key 9 | 10 | # List of IP prefixes to allocate tailaddresses from. 11 | # Each prefix consists of either an IPv4 or IPv6 address, 12 | @@ -93,7 +93,7 @@ derp: 13 | 14 | # Private key used to encrypt the traffic between headscale DERP and 15 | # Tailscale clients. A missing key will be automatically generated. 16 | - private_key_path: /var/lib/headscale/derp_server_private.key 17 | + private_key_path: /opt/var/lib/headscale/derp_server_private.key 18 | 19 | # This flag can be used, so the DERP map entry for the embedded DERP server is not written automatically, 20 | # it enables the creation of your very own DERP map entry using a locally available file with the parameter DERP.paths 21 | @@ -158,7 +158,7 @@ database: 22 | 23 | # SQLite config 24 | sqlite: 25 | - path: /var/lib/headscale/db.sqlite 26 | + path: /opt/var/lib/headscale/db.sqlite 27 | 28 | # Enable WAL mode for SQLite. This is recommended for production environments. 29 | # https://www.sqlite.org/wal.html 30 | @@ -206,7 +206,7 @@ tls_letsencrypt_hostname: "" 31 | # Path to store certificates and metadata needed by 32 | # letsencrypt 33 | # For production: 34 | -tls_letsencrypt_cache_dir: /var/lib/headscale/cache 35 | +tls_letsencrypt_cache_dir: /opt/var/lib/headscale/cache 36 | 37 | # Type of ACME challenge to use, currently supported types: 38 | # HTTP-01 or TLS-ALPN-01 39 | @@ -317,7 +317,7 @@ dns: 40 | 41 | # Unix socket used for the CLI to connect without authentication 42 | # Note: for production you will want to set this to something like: 43 | -unix_socket: /var/run/headscale/headscale.sock 44 | +unix_socket: /opt/var/run/headscale/headscale.sock 45 | unix_socket_permission: "0770" 46 | # 47 | # headscale supports experimental OpenID connect support, 48 | -------------------------------------------------------------------------------- /kopia/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=kopia 8 | PKG_VERSION:=0.20.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=496f2d5d96a27e0913b59cebd9b2509bca1896f2 13 | PKG_SOURCE_URL:=https://github.com/kopia/kopia 14 | PKG_MIRROR_HASH:=7ba45d14bdcd505abe227af8a1d36d6089c1c9e989fe6863d0e4d57b6b76b20a 15 | 16 | PKG_LICENSE:=Apache-2.0 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/kopia/Default 25 | SECTION:=utils 26 | CATEGORY:=Utilities 27 | SUBMENU:=Backup 28 | TITLE:=backup/restore tool 29 | URL:=https://kopia.io/ 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/kopia 34 | $(call Package/kopia/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/kopia_nohf 39 | $(call Package/kopia/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/kopia/description 45 | Kopia is a fast and secure open-source backup/restore tool that allows 46 | you to create encrypted snapshots of your data and save the snapshots 47 | to remote or cloud storage of your choice, to network-attached storage 48 | or server, or locally on your machine. 49 | endef 50 | 51 | Package/kopia_nohf/description=$(Package/kopia/description) 52 | 53 | define Package/kopia/conffiles 54 | /opt/etc/kopia/kopia.conf 55 | endef 56 | 57 | Package/kopia_nohf/conffiles=$(Package/kopia/conffiles) 58 | 59 | GO_LDFLAGS += \ 60 | -X '$(XIMPORTPATH)/repo.BuildVersion=$(PKG_VERSION)' \ 61 | -X '$(XIMPORTPATH)/repo.BuildInfo=$(COMMIT_SHORT)' \ 62 | -X '$(XIMPORTPATH)/repo.BuildGitHubRepo=$(PKG_NAME)' 63 | 64 | define Package/kopia/install 65 | $(INSTALL_DIR) $(1)/opt/bin 66 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/kopia $(1)/opt/bin 67 | $(INSTALL_DIR) $(1)/opt/etc/kopia 68 | $(INSTALL_DATA) ./files/kopia.conf $(1)/opt/etc/kopia 69 | $(INSTALL_DIR) $(1)/opt/etc/init.d 70 | $(INSTALL_BIN) ./files/S99kopia $(1)/opt/etc/init.d 71 | endef 72 | 73 | Package/kopia_nohf/install=$(Package/kopia/install) 74 | 75 | $(eval $(call BuildPackage,kopia)) 76 | $(eval $(call BuildPackage,kopia_nohf)) 77 | -------------------------------------------------------------------------------- /kopia/files/S99kopia: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f "/opt/etc/kopia/kopia.conf" ]; then 4 | . /opt/etc/kopia/kopia.conf || exit 0 5 | fi 6 | 7 | ENABLED=yes 8 | PROCS=kopia 9 | ARGS="server start $OPTIONS" 10 | PREARGS="" 11 | DESC=$PROCS 12 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 13 | 14 | . /opt/etc/init.d/rc.func 15 | -------------------------------------------------------------------------------- /kopia/files/kopia.conf: -------------------------------------------------------------------------------- 1 | # min4tst 2 | 3 | NO_PASS="--without-password" 4 | NO_TLS="--insecure" 5 | SRV_ADDR="--address=192.168.1.1:51515" 6 | 7 | OPTIONS="$NO_TLS $NO_PASS $SRV_ADDR" 8 | -------------------------------------------------------------------------------- /kopia/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/internal/mount/mount_posix_webdav_helper_linux.go 2 | +++ b/internal/mount/mount_posix_webdav_helper_linux.go 3 | @@ -6,18 +6,18 @@ import ( 4 | ) 5 | 6 | func mountWebDavHelper(ctx context.Context, url, path string) error { 7 | - mount := exec.Command("/usr/bin/mount", "-t", "davfs", "-r", url, path) 8 | + mount := exec.Command("/opt/bin/mount", "-t", "davfs", "-r", url, path) 9 | if err := mount.Run(); err != nil { 10 | - log(ctx).Errorf("mount command failed: %v. Cowardly refusing to run with root permissions. Try \"sudo /usr/bin/mount -t davfs -r %s %s\"\n", err, url, path) 11 | + log(ctx).Errorf("mount command failed: %v. Cowardly refusing to run with root permissions. Try \"sudo /opt/bin/mount -t davfs -r %s %s\"\n", err, url, path) 12 | } 13 | 14 | return nil 15 | } 16 | 17 | func unmountWebDevHelper(ctx context.Context, path string) error { 18 | - unmount := exec.Command("/usr/bin/umount", path) 19 | + unmount := exec.Command("/opt/bin/umount", path) 20 | if err := unmount.Run(); err != nil { 21 | - log(ctx).Errorf("umount command failed: %v. Cowardly refusing to run with root permissions. Try \"sudo /usr/bin/umount %s\"\n", err, path) 22 | + log(ctx).Errorf("umount command failed: %v. Cowardly refusing to run with root permissions. Try \"sudo /opt/bin/umount %s\"\n", err, path) 23 | } 24 | 25 | return nil 26 | --- a/internal/ospath/ospath_xdg.go 27 | +++ b/internal/ospath/ospath_xdg.go 28 | @@ -12,12 +12,12 @@ func init() { 29 | if os.Getenv("XDG_CONFIG_HOME") != "" { 30 | userSettingsDir = os.Getenv("XDG_CONFIG_HOME") 31 | } else { 32 | - userSettingsDir = filepath.Join(os.Getenv("HOME"), ".config") 33 | + userSettingsDir = filepath.Join("/opt", "/etc") 34 | } 35 | 36 | if os.Getenv("XDG_CACHE_HOME") != "" { 37 | userLogsDir = os.Getenv("XDG_CACHE_HOME") 38 | } else { 39 | - userLogsDir = filepath.Join(os.Getenv("HOME"), ".cache") 40 | + userLogsDir = filepath.Join("/opt/var", "/log") 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /kopia/patches/020-fix-mips-int32.patch: -------------------------------------------------------------------------------- 1 | --- a/fs/localfs/local_fs_32bit.go 2 | +++ b/fs/localfs/local_fs_32bit.go 3 | @@ -4,6 +4,6 @@ 4 | 5 | package localfs 6 | 7 | -func platformSpecificWidenDev(dev int32) uint64 { 8 | +func platformSpecificWidenDev(dev uint32) uint64 { 9 | return uint64(dev) //nolint:gosec 10 | } 11 | -------------------------------------------------------------------------------- /lux/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2022-2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=lux 8 | PKG_VERSION:=0.24.1 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=348ae97219784a32dd3c4721ad0cbc2584ee7b46 13 | PKG_SOURCE_URL:=https://github.com/iawia002/lux 14 | PKG_MIRROR_HASH:=b65af44eca517015d42f2679d7157642c759ff954a4adf044b84b55001bfc7fa 15 | 16 | PKG_BUILD_PARALLEL:=1 17 | 18 | include $(INCLUDE_DIR)/package.mk 19 | include $(INCLUDE_DIR)/golang.mk 20 | 21 | define Package/lux/Default 22 | SECTION:=net 23 | CATEGORY:=Network 24 | SUBMENU:=Download Manager 25 | TITLE:=a fast, simple and clean video downloader 26 | URL:=https://github.com/iawia002/lux 27 | MAINTAINER:=Entware team, https://entware.net 28 | DEPENDS:=+ffmpeg 29 | endef 30 | 31 | define Package/lux 32 | $(call Package/lux/Default) 33 | VARIANT:=hf 34 | endef 35 | 36 | define Package/lux_nohf 37 | $(call Package/lux/Default) 38 | VARIANT:=nohf 39 | DEPENDS+=@arm 40 | endef 41 | 42 | define Package/lux/description 43 | A fast, simple and clean video downloader built with Go (command line). 44 | endef 45 | 46 | Package/lux_nohf/description=$(Package/lux/description) 47 | 48 | GO_VARS += GO111MODULE=on 49 | 50 | define Package/lux/install 51 | $(INSTALL_DIR) $(1)/opt/bin 52 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/lux $(1)/opt/bin 53 | endef 54 | 55 | Package/lux_nohf/install=$(Package/lux/install) 56 | 57 | $(eval $(call BuildPackage,lux)) 58 | $(eval $(call BuildPackage,lux_nohf)) 59 | -------------------------------------------------------------------------------- /lyrebird/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=lyrebird 8 | PKG_VERSION:=0.6.1 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=$(PKG_NAME)-$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird 14 | PKG_MIRROR_HASH:=c80e9e9f9cc1b55e48d4a106fcba7684fe363a1dd3dae093ef31c38d08869d72 15 | 16 | PKG_LICENSE:=GPL-3.0-or-later 17 | PKG_LICENSE_FILES:=LICENSE LICENSE-GPL3.txt 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/lyrebird/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | TITLE:=pluggable transport proxy for Tor, implementing obfs4 29 | URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird 30 | endef 31 | 32 | define Package/lyrebird 33 | $(call Package/lyrebird/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/lyrebird_nohf 38 | $(call Package/lyrebird/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/lyrebird/description 44 | This is a look-like nothing obfuscation protocol that 45 | incorporates ideas and concepts from Philipp Winter's ScrambleSuit protocol. 46 | The obfs naming was chosen primarily because it was shorter, in terms of 47 | protocol ancestery obfs4 is much closer to ScrambleSuit than obfs2/obfs3. 48 | endef 49 | 50 | Package/lyrebird_nohf/description=$(Package/lyrebird/description) 51 | 52 | GO_LDFLAGS += -X 'main.lyrebirdVersion=$(PKG_VERSION)' 53 | 54 | GO_TARGET:=./cmd/lyrebird 55 | 56 | define Package/lyrebird/install 57 | $(INSTALL_DIR) $(1)/opt/sbin 58 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/lyrebird $(1)/opt/sbin 59 | endef 60 | 61 | Package/lyrebird_nohf/install=$(Package/lyrebird/install) 62 | 63 | $(eval $(call BuildPackage,lyrebird)) 64 | $(eval $(call BuildPackage,lyrebird_nohf)) 65 | -------------------------------------------------------------------------------- /meek/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=meek 8 | PKG_VERSION:=0.38.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek 14 | PKG_MIRROR_HASH:=fb491b37afdb56fb7f657b7434775945c64bba84cd0ff13fa95f659546ecb0f7 15 | 16 | PKG_LICENSE:=CC0-1.0 17 | PKG_LICENSE_FILES:=COPYING 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/meek/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | TITLE:=a blocking-resistant pluggable transport (HTTPS transport) 29 | URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/meek 30 | endef 31 | 32 | define Package/meek-client 33 | $(call Package/meek/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/meek-client_nohf 38 | $(call Package/meek/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/meek-server 44 | $(call Package/meek/Default) 45 | VARIANT:=hf 46 | endef 47 | 48 | define Package/meek-server_nohf 49 | $(call Package/meek/Default) 50 | VARIANT:=nohf 51 | DEPENDS:=@arm 52 | endef 53 | 54 | define Package/meek/description 55 | meek is a blocking-resistant pluggable transport for Tor. 56 | It encodes a data stream as a sequence of HTTPS requests and responses. 57 | Requests are reflected through a hard-to-block third-party web server in 58 | order to avoid talking directly to a Tor bridge. HTTPS encryption hides 59 | fingerprintable byte patterns in Tor traffic. 60 | endef 61 | 62 | Package/meek-client/description=$(Package/meek/description) 63 | Package/meek-client_nohf/description=$(Package/meek/description) 64 | Package/meek-server/description=$(Package/meek/description) 65 | Package/meek-server_nohf/description=$(Package/meek/description) 66 | 67 | GO_TARGET:=./meek-client ./meek-server 68 | 69 | define Package/meek-client/install 70 | $(INSTALL_DIR) $(1)/opt/sbin 71 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/meek-client $(1)/opt/sbin 72 | endef 73 | 74 | Package/meek-client_nohf/install=$(Package/meek-client/install) 75 | 76 | define Package/meek-server/install 77 | $(INSTALL_DIR) $(1)/opt/sbin 78 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/meek-server $(1)/opt/sbin 79 | endef 80 | 81 | Package/meek-server_nohf/install=$(Package/meek-server/install) 82 | 83 | $(eval $(call BuildPackage,meek-client)) 84 | $(eval $(call BuildPackage,meek-client_nohf)) 85 | $(eval $(call BuildPackage,meek-server)) 86 | $(eval $(call BuildPackage,meek-server_nohf)) 87 | -------------------------------------------------------------------------------- /micro/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=micro 8 | PKG_VERSION:=2.0.14 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2024-08-27 13 | PKG_SOURCE_VERSION:=04c577049ca898f097cd6a2dae69af0b4d4493e1 14 | PKG_SOURCE_URL:=https://github.com/zyedidia/micro 15 | PKG_MIRROR_HASH:=df355d8a7a0d1496aedb78bb302f527437946fcf2efac850b48f82edf220973a 16 | 17 | PKG_MAINTAINER:=Entware team, https://entware.net 18 | PKG_LICENSE:=MIT 19 | PKG_LICENSE_FILES:=LICENSE LICENSE-THIRD-PARTY 20 | 21 | PKG_BUILD_PARALLEL:=1 22 | 23 | include $(INCLUDE_DIR)/package.mk 24 | include $(INCLUDE_DIR)/golang.mk 25 | 26 | define Package/micro/Default 27 | SECTION:=utils 28 | CATEGORY:=Utilities 29 | SUBMENU:=Editors 30 | TITLE:=a modern and intuitive terminal-based text editor 31 | URL:=https://micro-editor.github.io/ 32 | endef 33 | 34 | define Package/micro 35 | $(call Package/micro/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/micro_nohf 40 | $(call Package/micro/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/micro/description 46 | micro is a terminal-based text editor that aims to be easy 47 | to use and intuitive, while also taking advantage of the capabilities of 48 | modern terminals. 49 | endef 50 | 51 | Package/micro_nohf/description=$(Package/micro/description) 52 | 53 | GO_LDFLAGS += \ 54 | -X '$(XIMPORTPATH)/v2/internal/util.Version=$(PKG_VERSION)' \ 55 | -X '$(XIMPORTPATH)/v2/internal/util.CommitHash=$(COMMIT_SHORT)' \ 56 | -X '$(XIMPORTPATH)/v2/internal/util.CompileDate=$(PKG_SOURCE_DATE)' 57 | 58 | GO_TARGET:=./cmd/micro 59 | 60 | define Build/Compile 61 | ( cd $(PKG_BUILD_DIR); $(GO_BIN_GENERATE) ./runtime; ) 62 | $(call Build/Compile/Go) 63 | endef 64 | 65 | define Package/micro/install 66 | $(INSTALL_DIR) $(1)/opt/sbin 67 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/micro $(1)/opt/sbin 68 | endef 69 | 70 | Package/micro_nohf/install=$(Package/micro/install) 71 | 72 | $(eval $(call BuildPackage,micro)) 73 | $(eval $(call BuildPackage,micro_nohf)) 74 | -------------------------------------------------------------------------------- /nebula/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2020-2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=nebula 8 | PKG_VERSION:=1.9.5 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/slackhq/nebula 14 | PKG_MIRROR_HASH:=a03af4045555a8c8b3d9b477b6cb1c92c0521465d1e427f59fee719aa67ff693 15 | 16 | PKG_BUILD_PARALLEL:=1 17 | 18 | include $(INCLUDE_DIR)/package.mk 19 | include $(INCLUDE_DIR)/golang.mk 20 | 21 | define Package/nebula/Default 22 | SECTION:=net 23 | CATEGORY:=Network 24 | TITLE:=a scalable overlay networking tool 25 | URL:=https://github.com/slackhq/nebula 26 | MAINTAINER:=Entware team, https://entware.net 27 | endef 28 | 29 | define Package/nebula 30 | $(call Package/nebula/Default) 31 | VARIANT:=hf 32 | endef 33 | 34 | define Package/nebula_nohf 35 | $(call Package/nebula/Default) 36 | VARIANT:=nohf 37 | DEPENDS:=@arm 38 | endef 39 | 40 | define Package/nebula/description 41 | Nebula is a scalable overlay networking tool with a focus on performance, 42 | simplicity and security. It lets you seamlessly connect computers anywhere 43 | in the world. Nebula is portable, and runs on Linux, OSX, and Windows. It 44 | can be used to connect a small number of computers, but is also able to 45 | connect tens of thousands of computers. 46 | endef 47 | 48 | Package/nebula_nohf/description=$(Package/nebula/description) 49 | 50 | GO_LDFLAGS += \ 51 | -X 'main.Build=$(PKG_VERSION)' 52 | 53 | GO_VARS += GO111MODULE=on 54 | 55 | GO_TARGET:=./cmd/nebula ./cmd/nebula-cert 56 | 57 | define Package/nebula/install 58 | $(INSTALL_DIR) $(1)/opt/bin 59 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/nebula{,-cert} $(1)/opt/bin 60 | endef 61 | 62 | Package/nebula_nohf/install=$(Package/nebula/install) 63 | 64 | $(eval $(call BuildPackage,nebula)) 65 | $(eval $(call BuildPackage,nebula_nohf)) 66 | -------------------------------------------------------------------------------- /netbird/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=netbird 8 | PKG_VERSION:=0.44.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-05-16 13 | PKG_SOURCE_VERSION:=99f8dc7748c30049456ae5f16dc44a415751f93d 14 | PKG_SOURCE_URL:=https://github.com/netbirdio/netbird 15 | PKG_MIRROR_HASH:=84264d6c3c3215ce30256c692a59844eefc135e7570aedf176ec671189909c69 16 | 17 | PKG_MAINTAINER:=Entware team, https://entware.net 18 | PKG_LICENSE:=BSD-3-Clause 19 | PKG_LICENSE_FILES:=LICENSE 20 | 21 | PKG_BUILD_PARALLEL:=1 22 | # for management (and signal?) 23 | #PKG_CGO_ENABLED:=1 24 | 25 | include $(INCLUDE_DIR)/package.mk 26 | include $(INCLUDE_DIR)/golang.mk 27 | 28 | define Package/netbird/Default 29 | SECTION:=net 30 | CATEGORY:=Network 31 | SUBMENU:=VPN 32 | TITLE:=A WireGuard-based mesh network (client) 33 | URL:=https://netbird.io/ 34 | # DEPENDS:=+ca-bundle +iptables 35 | endef 36 | 37 | define Package/netbird 38 | $(call Package/netbird/Default) 39 | VARIANT:=hf 40 | endef 41 | 42 | define Package/netbird_nohf 43 | $(call Package/netbird/Default) 44 | VARIANT:=nohf 45 | DEPENDS:=@arm 46 | endef 47 | 48 | define Package/netbird/description 49 | Connect your devices into a single secure private WireGuard®-based 50 | mesh network with SSO/MFA and simple access controls. 51 | endef 52 | 53 | Package/netbird_nohf/description=$(Package/netbird/description) 54 | 55 | define Package/netbird/conffiles 56 | /opt/etc/netbird/config.json 57 | /opt/etc/netbird/env 58 | endef 59 | 60 | Package/netbird_nohf/conffiles=$(Package/netbird/conffiles) 61 | 62 | GO_LDFLAGS += \ 63 | -X '$(XIMPORTPATH)/version.version=$(PKG_VERSION)' \ 64 | -X 'main.commit=$(COMMIT_SHORT)' \ 65 | -X 'main.date=$(PKG_SOURCE_DATE)' \ 66 | -X 'main.builtBy=Entware' 67 | 68 | GO_TARGET:=./client ./management ./signal 69 | 70 | define Package/netbird/install 71 | $(INSTALL_DIR) $(1)/opt/etc/init.d 72 | $(INSTALL_BIN) ./files/S99netbird $(1)/opt/etc/init.d 73 | $(INSTALL_DIR) $(1)/opt/etc/netbird 74 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/release_files/systemd/env \ 75 | $(1)/opt/etc/netbird 76 | $(INSTALL_DIR) $(1)/opt/sbin 77 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/client $(1)/opt/sbin/netbird 78 | # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/management $(1)/opt/sbin/netbird-mgmt 79 | # $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/signal $(1)/opt/sbin/netbird-signal 80 | endef 81 | 82 | Package/netbird_nohf/install=$(Package/netbird/install) 83 | 84 | $(eval $(call BuildPackage,netbird)) 85 | $(eval $(call BuildPackage,netbird_nohf)) 86 | -------------------------------------------------------------------------------- /netbird/files/S99netbird: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -f "/opt/etc/netbird/env" ] && . /opt/etc/netbird/env 4 | 5 | ENABLED=yes 6 | PROCS=netbird 7 | ARGS="service run $FLAGS" 8 | PREARGS="" 9 | DESC="Netbird Client" 10 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 11 | 12 | . /opt/etc/init.d/rc.func 13 | -------------------------------------------------------------------------------- /netbird/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/client/cmd/root.go 2 | +++ b/client/cmd/root.go 3 | @@ -95,11 +95,11 @@ func Execute() error { 4 | } 5 | 6 | func init() { 7 | - defaultConfigPathDir = "/etc/netbird/" 8 | - defaultLogFileDir = "/var/log/netbird/" 9 | + defaultConfigPathDir = "/opt/etc/netbird/" 10 | + defaultLogFileDir = "/opt/var/log/netbird/" 11 | 12 | - oldDefaultConfigPathDir = "/etc/wiretrustee/" 13 | - oldDefaultLogFileDir = "/var/log/wiretrustee/" 14 | + oldDefaultConfigPathDir = "/opt/etc/wiretrustee/" 15 | + oldDefaultLogFileDir = "/opt/var/log/wiretrustee/" 16 | 17 | switch runtime.GOOS { 18 | case "windows": 19 | @@ -118,7 +118,7 @@ func init() { 20 | oldDefaultConfigPath = oldDefaultConfigPathDir + "config.json" 21 | oldDefaultLogFile = oldDefaultLogFileDir + "client.log" 22 | 23 | - defaultDaemonAddr := "unix:///var/run/netbird.sock" 24 | + defaultDaemonAddr := "unix:///opt/var/run/netbird.sock" 25 | if runtime.GOOS == "windows" { 26 | defaultDaemonAddr = "tcp://127.0.0.1:41731" 27 | } 28 | --- a/client/configs/configs.go 29 | +++ b/client/configs/configs.go 30 | @@ -17,7 +17,7 @@ func init() { 31 | case "windows": 32 | StateDir = filepath.Join(os.Getenv("PROGRAMDATA"), "Netbird") 33 | case "darwin", "linux": 34 | - StateDir = "/var/lib/netbird" 35 | + StateDir = "/opt/var/lib/netbird" 36 | case "freebsd", "openbsd", "netbsd", "dragonfly": 37 | StateDir = "/var/db/netbird" 38 | } 39 | --- a/client/iface/configurer/usp.go 40 | +++ b/client/iface/configurer/usp.go 41 | @@ -210,7 +210,7 @@ func (t *WGUSPConfigurer) Close() { 42 | } 43 | 44 | if runtime.GOOS == "linux" { 45 | - sockPath := "/var/run/wireguard/" + t.deviceName + ".sock" 46 | + sockPath := "/opt/var/run/wireguard/" + t.deviceName + ".sock" 47 | if _, statErr := os.Stat(sockPath); statErr == nil { 48 | _ = os.Remove(sockPath) 49 | } 50 | --- a/client/internal/routemanager/systemops/systemops_linux.go 51 | +++ b/client/internal/routemanager/systemops/systemops_linux.go 52 | @@ -29,7 +29,7 @@ const ( 53 | NetbirdVPNTableName = "netbird" 54 | 55 | // rtTablesPath is the path to the file containing the routing table names. 56 | - rtTablesPath = "/etc/iproute2/rt_tables" 57 | + rtTablesPath = "/opt/etc/iproute2/rt_tables" 58 | 59 | // ipv4ForwardingPath is the path to the file containing the IP forwarding setting. 60 | ipv4ForwardingPath = "net.ipv4.ip_forward" 61 | --- a/client/system/osrelease_unix.go 62 | +++ b/client/system/osrelease_unix.go 63 | @@ -11,9 +11,9 @@ import ( 64 | ) 65 | 66 | func readOsReleaseFile() (osName string, osVer string) { 67 | - file, err := os.Open("/etc/os-release") 68 | + file, err := os.Open("/opt/etc/os-release") 69 | if err != nil { 70 | - log.Warnf("failed to open file /etc/os-release: %s", err) 71 | + log.Warnf("failed to open file /opt/etc/os-release: %s", err) 72 | return "", "" 73 | } 74 | defer file.Close() 75 | --- a/client/ui/client_ui.go 76 | +++ b/client/ui/client_ui.go 77 | @@ -103,7 +103,7 @@ func main() { 78 | 79 | // parseFlags reads and returns all needed command-line flags. 80 | func parseFlags() (daemonAddr string, showSettings, showNetworks, showDebug bool, errorMsg string, saveLogsInFile bool) { 81 | - defaultDaemonAddr := "unix:///var/run/netbird.sock" 82 | + defaultDaemonAddr := "unix:///opt/var/run/netbird.sock" 83 | if runtime.GOOS == "windows" { 84 | defaultDaemonAddr = "tcp://127.0.0.1:41731" 85 | } 86 | --- a/management/cmd/defaults.go 87 | +++ b/management/cmd/defaults.go 88 | @@ -1,13 +1,13 @@ 89 | package cmd 90 | 91 | const ( 92 | - defaultMgmtDataDir = "/var/lib/netbird/" 93 | - defaultMgmtConfigDir = "/etc/netbird" 94 | - defaultLogDir = "/var/log/netbird" 95 | + defaultMgmtDataDir = "/opt/var/lib/netbird/" 96 | + defaultMgmtConfigDir = "/opt/etc/netbird" 97 | + defaultLogDir = "/opt/var/log/netbird" 98 | 99 | - oldDefaultMgmtDataDir = "/var/lib/wiretrustee/" 100 | - oldDefaultMgmtConfigDir = "/etc/wiretrustee" 101 | - oldDefaultLogDir = "/var/log/wiretrustee" 102 | + oldDefaultMgmtDataDir = "/opt/var/lib/wiretrustee/" 103 | + oldDefaultMgmtConfigDir = "/opt/etc/wiretrustee" 104 | + oldDefaultLogDir = "/opt/var/log/wiretrustee" 105 | 106 | defaultMgmtConfig = defaultMgmtConfigDir + "/management.json" 107 | defaultLogFile = defaultLogDir + "/management.log" 108 | --- a/signal/cmd/root.go 109 | +++ b/signal/cmd/root.go 110 | @@ -39,8 +39,8 @@ func Execute() error { 111 | 112 | func init() { 113 | stopCh = make(chan int) 114 | - defaultLogFile = "/var/log/netbird/signal.log" 115 | - defaultSignalSSLDir = "/var/lib/netbird/" 116 | + defaultLogFile = "/opt/var/log/netbird/signal.log" 117 | + defaultSignalSSLDir = "/opt/var/lib/netbird/" 118 | 119 | if runtime.GOOS == "windows" { 120 | defaultLogFile = os.Getenv("PROGRAMDATA") + "\\Netbird\\" + "signal.log" 121 | --- a/upload-server/server/local.go 122 | +++ b/upload-server/server/local.go 123 | @@ -14,7 +14,7 @@ import ( 124 | ) 125 | 126 | const ( 127 | - defaultDir = "/var/lib/netbird" 128 | + defaultDir = "/opt/var/lib/netbird" 129 | putHandler = "/{dir}/{file}" 130 | ) 131 | 132 | -------------------------------------------------------------------------------- /netflow-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | # 5 | # based on fork from paihu/netflow_exporter 6 | 7 | include $(TOPDIR)/rules.mk 8 | 9 | PKG_NAME:=netflow-exporter 10 | PKG_VERSION:=0.0.0 11 | PKG_RELEASE:=1 12 | 13 | PKG_SOURCE_PROTO:=git 14 | PKG_SOURCE_DATE:=2021-11-22 15 | PKG_SOURCE_VERSION:=b28b09684a775fa069da642606709db98cac6abb 16 | PKG_SOURCE_URL:=https://github.com/AlfredArouna/netflow_exporter 17 | PKG_MIRROR_HASH:=7328cdf332521bad28448cca70eb6abba02b0b76ce078b831ac1ffadfa622862 18 | 19 | PKG_LICENSE:= 20 | PKG_LICENSE_FILES:= 21 | 22 | PKG_BUILD_PARALLEL:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/netflow-exporter/Default 28 | SECTION:=utils 29 | CATEGORY:=Utilities 30 | SUBMENU:=prometheus tools 31 | TITLE:=Prometheus netflow Exporter 32 | URL:=https://github.com/AlfredArouna/netflow_exporter 33 | MAINTAINER:=Entware team, https://entware.net 34 | endef 35 | 36 | define Package/netflow-exporter 37 | $(call Package/netflow-exporter/Default) 38 | VARIANT:=hf 39 | endef 40 | 41 | define Package/netflow-exporter_nohf 42 | $(call Package/netflow-exporter/Default) 43 | VARIANT:=nohf 44 | DEPENDS:=@arm 45 | endef 46 | 47 | define Package/netflow-exporter/description 48 | This is an exporter that exposes information gathered from netflow 49 | for use by the Prometheus monitoring system. 50 | endef 51 | 52 | Package/netflow-exporter_nohf/description=$(Package/netflow-exporter/description) 53 | 54 | GO_LDFLAGS += \ 55 | -X 'github.com/prometheus/common/version.Version=$(PKG_VERSION)' \ 56 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 57 | -X 'github.com/prometheus/common/version.Branch="master"' \ 58 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 59 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 60 | 61 | define Build/Compile 62 | ( cd $(PKG_BUILD_DIR); rm -f ipdb.go; $(GO_BIN_MOD_TIDY); ) 63 | $(call Build/Compile/Go) 64 | endef 65 | 66 | define Package/netflow-exporter/install 67 | $(INSTALL_DIR) $(1)/opt/bin 68 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/netflow_exporter $(1)/opt/bin 69 | $(INSTALL_DIR) $(1)/opt/etc/init.d 70 | $(INSTALL_BIN) ./files/S99netflow_exporter $(1)/opt/etc/init.d 71 | endef 72 | 73 | Package/netflow-exporter_nohf/install=$(Package/netflow-exporter/install) 74 | 75 | $(eval $(call BuildPackage,netflow-exporter)) 76 | $(eval $(call BuildPackage,netflow-exporter_nohf)) 77 | -------------------------------------------------------------------------------- /netflow-exporter/files/S99netflow_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=netflow_exporter 5 | ARGS="" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /netflow-exporter/patches/020-fix-err.patch: -------------------------------------------------------------------------------- 1 | --- a/main.go 2 | +++ b/main.go 3 | @@ -79,7 +79,7 @@ func (c *netflowCollector) processReader 4 | buf := make([]byte, 65535) 5 | chars, srcAddress, err := udpSock.ReadFromUDP(buf) 6 | if err != nil { 7 | - log.Errorf("Error reading UDP packet from %s: %s", srcAddress, err) 8 | + log.Printf("Error reading UDP packet from %s: %s", srcAddress, err) 9 | continue 10 | } 11 | timestampMs := int64(float64(time.Now().UnixNano()) / 1e6) 12 | @@ -125,17 +125,17 @@ func (c *netflowCollector) processReader 13 | } 14 | 15 | case *netflow9.Packet: 16 | - //log.Infoln("NetFlow 9") 17 | + //log.Print("NetFlow 9") 18 | for _, set := range p.DataFlowSets { 19 | for _, record := range set.Records { 20 | labels := prometheus.Labels{} 21 | counts := make(map[string]float64) 22 | for _, field := range record.Fields { 23 | if len(*netflowExclude) > 0 && regexp.MustCompile(*netflowExclude).MatchString(field.Translated.Name) { 24 | - //log.Infoln(field,"is not using label") 25 | + //log.Print(field,"is not using label") 26 | } else if regexp.MustCompile(*netflowCollects).MatchString(field.Translated.Name) { 27 | counts[field.Translated.Name] = float64(field.Translated.Value.(uint64)) 28 | - //log.Infoln(field,"is using metric") 29 | + //log.Print(field,"is using metric") 30 | } else { 31 | labels[field.Translated.Name] = fmt.Sprintf("%v", field.Translated.Value) 32 | } 33 | @@ -146,14 +146,14 @@ func (c *netflowCollector) processReader 34 | labels["TemplateID"] = fmt.Sprintf("%d",record.TemplateID) 35 | labels["NetflowVersion"] = "9" 36 | 37 | - //log.Infoln(labels["sourceIPv4Address"]) 38 | - //log.Infoln(labels["destinationIPv4Address"]) 39 | + //log.Print(labels["sourceIPv4Address"]) 40 | + //log.Print(labels["destinationIPv4Address"]) 41 | 42 | // Add IP data 43 | if labels["sourceIPv4Address"] != "" && labels["destinationIPv4Address"] != "" { 44 | ip_data := ipdb.GetIpInfo(labels["sourceIPv4Address"], *lan_net, *lan_asn, *lan_asn_name, 45 | *private_asn, *private_asn_name, *storage_file, *refresh_info ) 46 | - //log.Infoln(ip_data) 47 | + //log.Print(ip_data) 48 | labels["sourceAS"] = fmt.Sprintf("%d",ip_data.Asn) 49 | labels["sourceCountry"] = ip_data.Country 50 | labels["sourceRegistry"] = ip_data.Registry 51 | @@ -162,7 +162,7 @@ func (c *netflowCollector) processReader 52 | 53 | ip_data = ipdb.GetIpInfo(labels["destinationIPv4Address"], *lan_net, *lan_asn, *lan_asn_name, 54 | *private_asn, *private_asn_name, *storage_file, *refresh_info ) 55 | - //log.Infoln(ip_data) 56 | + //log.Print(ip_data) 57 | labels["destinationAS"] = fmt.Sprintf("%d",ip_data.Asn) 58 | labels["destinationCountry"] = ip_data.Country 59 | labels["destinationRegistry"] = ip_data.Registry 60 | @@ -181,7 +181,7 @@ func (c *netflowCollector) processReader 61 | } 62 | } 63 | default: 64 | - log.Infoln("packet is not supported version") 65 | + log.Print("packet is not supported version") 66 | } 67 | 68 | } 69 | @@ -251,7 +251,7 @@ func (c *netflowCollector) Collect(ch ch 70 | desc = fmt.Sprintf("netflow_%s_%s", sample.Labels["From"], key) 71 | } 72 | desc = strings.Replace(desc,".","",-1) 73 | - log.Infoln(desc) 74 | + log.Print(desc) 75 | ch <- MustNewTimeConstMetric( 76 | prometheus.NewDesc(desc, 77 | fmt.Sprintf("netflow metric %s", key), 78 | @@ -299,8 +299,8 @@ func main() { 79 | os.Exit(0) 80 | } 81 | 82 | - log.Infoln("Starting netflow_exporter", version.Info()) 83 | - log.Infoln("Build context", version.BuildContext()) 84 | + log.Print("Starting netflow_exporter", version.Info()) 85 | + log.Print("Build context", version.BuildContext()) 86 | 87 | http.Handle(*metricsPath, promhttp.Handler()) 88 | 89 | @@ -315,9 +315,9 @@ func main() { 90 | if err != nil { 91 | log.Fatalf("Error lisening to UDP address: %s", err) 92 | } 93 | - log.Infoln("include", *netflowCollects) 94 | + log.Print("include", *netflowCollects) 95 | if len(*netflowExclude) > 0 { 96 | - log.Infoln("exclude", *netflowExclude) 97 | + log.Print("exclude", *netflowExclude) 98 | } 99 | go c.processReader(udpSock) 100 | 101 | @@ -331,7 +331,7 @@ func main() { 102 | `)) 103 | }) 104 | 105 | - log.Infoln("Listening on", *listenAddress) 106 | - log.Infoln("Listening UDP on", *netflowAddress) 107 | + log.Print("Listening on", *listenAddress) 108 | + log.Print("Listening UDP on", *netflowAddress) 109 | log.Fatal(http.ListenAndServe(*listenAddress, nil)) 110 | } 111 | -------------------------------------------------------------------------------- /nextdns/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2020-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=nextdns 8 | PKG_VERSION:=1.45.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=8bf668e033843b1d0a43bb17ebafcc8d13b36a81 13 | PKG_SOURCE_URL:=https://github.com/nextdns/nextdns 14 | PKG_MIRROR_HASH:=370ff6fc679b12e5cd3e15f81e90e879e01c66e7014411a01c80958429a6c18b 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/nextdns/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=IP Addresses and Names 28 | TITLE:=NextDNS CLI Client 29 | URL:=https://nextdns.io/ 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/nextdns 34 | $(call Package/nextdns/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/nextdns_nohf 39 | $(call Package/nextdns/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/nextdns/description 45 | NextDNS CLI is a DNS53 to DNS-over-HTTPS (DoH) proxy with 46 | advanced capabilities to get the most out of the NextDNS 47 | service. Although the most advanced features will only work 48 | with NextDNS, this program can work as a client for any DoH 49 | provider or a mix of NextDNS + another DNS (split horizon). 50 | endef 51 | 52 | Package/nextdns_nohf/description=$(Package/nextdns/description) 53 | 54 | GO_LDFLAGS += \ 55 | -X 'main.Build=v$(PKG_VERSION)' 56 | 57 | GO_VARS += GO111MODULE=on 58 | 59 | define Package/nextdns/install 60 | $(INSTALL_DIR) $(1)/opt/bin 61 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/nextdns $(1)/opt/bin 62 | endef 63 | 64 | Package/nextdns_nohf/install=$(Package/nextdns/install) 65 | 66 | $(eval $(call BuildPackage,nextdns)) 67 | $(eval $(call BuildPackage,nextdns_nohf)) 68 | -------------------------------------------------------------------------------- /obfs4/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2011-2021 Entware 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | 10 | PKG_NAME:=obfs4 11 | PKG_VERSION:=0.0.14 12 | PKG_RELEASE:=1 13 | 14 | PKG_SOURCE_PROTO:=git 15 | PKG_SOURCE_VERSION:=336a71d6e4cfd2d33e9c57797828007ad74975e9 16 | PKG_SOURCE_URL:=https://gitlab.com/yawning/obfs4 17 | PKG_MIRROR_HASH:=8fa7950328b64c9cdea86c5d343f3043f9f1273df1b4e6efe985d53f607ba66e 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/obfs4/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | TITLE:=A Tor pluggable transport proxy, implementing obfs4 28 | URL:=https://gitlab.com/yawning/obfs4 29 | MAINTAINER:=Entware team, https://entware.net 30 | DEPENDS:=+tor 31 | endef 32 | 33 | define Package/obfs4 34 | $(call Package/obfs4/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/obfs4_nohf 39 | $(call Package/obfs4/Default) 40 | VARIANT:=nohf 41 | DEPENDS+=@arm 42 | endef 43 | 44 | define Package/obfs4/description 45 | obfs4proxy is a tool that attempts to circumvent censorship by 46 | transforming the Tor traffic between the client and the bridge. This way 47 | censors, who usually monitor traffic between the client and the bridge, 48 | will see innocent-looking transformed traffic instead of the actual Tor 49 | traffic. 50 | 51 | obfs4proxy implements the obfsucation protocols obfs2, obfs3, and obfs4. 52 | 53 | It is written in Go and is compliant with the Tor pluggable transports 54 | specification, and its modular architecture allows it to support 55 | multiple pluggable transports. 56 | endef 57 | 58 | Package/obfs4_nohf/description=$(Package/obfs4/description) 59 | 60 | GO_TARGET:=./obfs4proxy 61 | 62 | define Package/obfs4/install 63 | $(INSTALL_DIR) $(1)/opt/sbin 64 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/obfs4proxy $(1)/opt/sbin 65 | endef 66 | 67 | Package/obfs4_nohf/install=$(Package/obfs4/install) 68 | 69 | $(eval $(call BuildPackage,obfs4)) 70 | $(eval $(call BuildPackage,obfs4_nohf)) 71 | -------------------------------------------------------------------------------- /prometheus-blackbox-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=prometheus-blackbox-exporter 8 | PKG_VERSION:=0.26.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-02-26 13 | PKG_SOURCE_VERSION:=444e3d089ae1aeeed385712ef84a5fa4f0c083ec 14 | PKG_SOURCE_URL:=https://github.com/prometheus/blackbox_exporter 15 | PKG_MIRROR_HASH:=996ca535176ce1dbb6ffa37452aae706e501a530c205aef00501b78eb4d32bd0 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/prometheus-blackbox-exporter/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | SUBMENU:=prometheus tools 29 | TITLE:=Blackbox prober exporter 30 | URL:=https://prometheus.io/ 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/prometheus-blackbox-exporter 35 | $(call Package/prometheus-blackbox-exporter/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/prometheus-blackbox-exporter_nohf 40 | $(call Package/prometheus-blackbox-exporter/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/prometheus-blackbox-exporter/description 46 | The blackbox exporter allows blackbox probing of endpoints 47 | over HTTP, HTTPS, DNS, TCP, ICMP and gRPC. 48 | endef 49 | 50 | Package/prometheus-blackbox-exporter_nohf/description=$(Package/prometheus-blackbox-exporter/description) 51 | 52 | define Package/blackbox_exporter/conffiles 53 | /opt/etc/prometheus/blackbox.yml 54 | endef 55 | 56 | Package/blackbox_exporter_nohf/conffiles=$(Package/blackbox_exporter/conffiles) 57 | 58 | GO_BUILD_ARGS += -a 59 | 60 | GO_LDFLAGS += \ 61 | -X 'github.com/prometheus/common/version.Version=$(PKG_VERSION)' \ 62 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 63 | -X 'github.com/prometheus/common/version.Branch="release"' \ 64 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 65 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 66 | 67 | GO_TAGS:=netgo 68 | 69 | define Package/prometheus-blackbox-exporter/install 70 | $(INSTALL_DIR) $(1)/opt/bin 71 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/blackbox_exporter $(1)/opt/bin 72 | $(INSTALL_DIR) $(1)/opt/etc/init.d 73 | $(INSTALL_BIN) ./files/S99blackbox_exporter $(1)/opt/etc/init.d 74 | $(INSTALL_DIR) $(1)/opt/etc/prometheus 75 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/blackbox.yml $(1)/opt/etc/prometheus 76 | endef 77 | 78 | Package/prometheus-blackbox-exporter_nohf/install=$(Package/prometheus-blackbox-exporter/install) 79 | 80 | $(eval $(call BuildPackage,prometheus-blackbox-exporter)) 81 | $(eval $(call BuildPackage,prometheus-blackbox-exporter_nohf)) 82 | -------------------------------------------------------------------------------- /prometheus-blackbox-exporter/files/S99blackbox_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=blackbox_exporter 5 | ARGS="--config.file=/opt/etc/prometheus/blackbox.yml" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /prometheus-collectd-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=prometheus-collectd-exporter 8 | PKG_VERSION:=0.7.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2024-11-07 13 | PKG_SOURCE_VERSION:=91d0c4593229a396b3076762710268efa7dd4133 14 | PKG_SOURCE_URL:=https://github.com/prometheus/collectd_exporter 15 | PKG_MIRROR_HASH:=4d2df1988a8567724e9029b0a6493c19b0f10febad62f6c3eb84997a94848eba 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/prometheus-collectd-exporter/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | SUBMENU:=prometheus tools 29 | TITLE:=Collectd Exporter 30 | URL:=https://prometheus.io/ 31 | MAINTAINER:=Entware team, https://entware.net 32 | DEPENDS:=+collectd 33 | endef 34 | 35 | define Package/prometheus-collectd-exporter 36 | $(call Package/prometheus-collectd-exporter/Default) 37 | VARIANT:=hf 38 | endef 39 | 40 | define Package/prometheus-collectd-exporter_nohf 41 | $(call Package/prometheus-collectd-exporter/Default) 42 | VARIANT:=nohf 43 | DEPENDS+=@arm 44 | endef 45 | 46 | define Package/prometheus-collectd-exporter/description 47 | A server that accepts collectd stats via HTTP POST and exports 48 | them via HTTP for Prometheus consumption. 49 | endef 50 | 51 | Package/prometheus-collectd-exporter_nohf/description=$(Package/prometheus-collectd-exporter/description) 52 | 53 | GO_BUILD_ARGS += -a 54 | 55 | GO_LDFLAGS += \ 56 | -X 'github.com/prometheus/common/version.Version=$(PKG_VERSION)' \ 57 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 58 | -X 'github.com/prometheus/common/version.Branch="release"' \ 59 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 60 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 61 | 62 | GO_TAGS:=netgo 63 | 64 | define Package/prometheus-collectd-exporter/install 65 | $(INSTALL_DIR) $(1)/opt/bin 66 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/collectd_exporter $(1)/opt/bin 67 | $(INSTALL_DIR) $(1)/opt/etc/init.d 68 | $(INSTALL_BIN) ./files/S99collectd_exporter $(1)/opt/etc/init.d 69 | endef 70 | 71 | Package/prometheus-collectd-exporter_nohf/install=$(Package/prometheus-collectd-exporter/install) 72 | 73 | $(eval $(call BuildPackage,prometheus-collectd-exporter)) 74 | $(eval $(call BuildPackage,prometheus-collectd-exporter_nohf)) 75 | -------------------------------------------------------------------------------- /prometheus-collectd-exporter/files/S99collectd_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=collectd_exporter 5 | ARGS="--collectd.listen-address=:25826" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /prometheus-haproxy-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2024 Entware 4 | # 5 | # Project archived by the owner on Mar 8, 2023. 6 | 7 | include $(TOPDIR)/rules.mk 8 | 9 | PKG_NAME:=prometheus-haproxy-exporter 10 | PKG_VERSION:=0.15.0 11 | PKG_RELEASE:=1 12 | 13 | PKG_SOURCE_PROTO:=git 14 | PKG_SOURCE_DATE:=2023-02-15 15 | PKG_SOURCE_VERSION:=d4aba878f043fd3ad0bcacd0149e7d75e67c0faa 16 | PKG_SOURCE_URL:=https://github.com/prometheus/haproxy_exporter 17 | PKG_MIRROR_HASH:=8e8c64ccc7e3b0a530516d91ece818fd9260b77c73a22c69ac3273101b8a66c5 18 | 19 | PKG_LICENSE:=Apache-2.0 20 | PKG_LICENSE_FILES:=LICENSE 21 | 22 | PKG_BUILD_PARALLEL:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/prometheus-haproxy-exporter/Default 28 | SECTION:=utils 29 | CATEGORY:=Utilities 30 | SUBMENU:=prometheus tools 31 | TITLE:=HAProxy Exporter for Prometheus 32 | URL:=https://prometheus.io/ 33 | MAINTAINER:=Entware team, https://entware.net 34 | DEPENDS:=+haproxy 35 | endef 36 | 37 | define Package/prometheus-haproxy-exporter 38 | $(call Package/prometheus-haproxy-exporter/Default) 39 | VARIANT:=hf 40 | endef 41 | 42 | define Package/prometheus-haproxy-exporter_nohf 43 | $(call Package/prometheus-haproxy-exporter/Default) 44 | VARIANT:=nohf 45 | DEPENDS+=@arm 46 | endef 47 | 48 | define Package/prometheus-haproxy-exporter/description 49 | Simple server that scrapes HAProxy stats and exports 50 | them via HTTP for Prometheus consumption. 51 | endef 52 | 53 | Package/prometheus-haproxy-exporter_nohf/description=$(Package/prometheus-haproxy-exporter/description) 54 | 55 | GO_BUILD_ARGS += -a 56 | 57 | GO_LDFLAGS += \ 58 | -X 'github.com/prometheus/common/version.Version=$(PKG_VERSION)' \ 59 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 60 | -X 'github.com/prometheus/common/version.Branch="release"' \ 61 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 62 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 63 | 64 | GO_TAGS:=netgo 65 | 66 | define Package/prometheus-haproxy-exporter/install 67 | $(INSTALL_DIR) $(1)/opt/bin 68 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/haproxy_exporter $(1)/opt/bin 69 | $(INSTALL_DIR) $(1)/opt/etc/init.d 70 | $(INSTALL_BIN) ./files/S99haproxy_exporter $(1)/opt/etc/init.d 71 | endef 72 | 73 | Package/prometheus-haproxy-exporter_nohf/install=$(Package/prometheus-haproxy-exporter/install) 74 | 75 | $(eval $(call BuildPackage,prometheus-haproxy-exporter)) 76 | $(eval $(call BuildPackage,prometheus-haproxy-exporter_nohf)) 77 | -------------------------------------------------------------------------------- /prometheus-haproxy-exporter/files/S99haproxy_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=haproxy_exporter 5 | ARGS="--haproxy.scrape-uri=http://localhost:8404/stats?stats;csv" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /prometheus-node-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=prometheus-node-exporter 8 | PKG_VERSION:=1.9.1 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-04-01 13 | PKG_SOURCE_VERSION:=f2ec547b49af53815038a50265aa2adcd1275959 14 | PKG_SOURCE_URL:=https://github.com/prometheus/node_exporter 15 | PKG_MIRROR_HASH:=22a44bfed612154afa0715a61f6b31ed2d5272fe9900a591e6b4edd1adb8abfd 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/prometheus-node-exporter/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | SUBMENU:=prometheus tools 29 | TITLE:=Exporter for machine metrics 30 | URL:=https://prometheus.io/ 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/prometheus-node-exporter 35 | $(call Package/prometheus-node-exporter/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/prometheus-node-exporter_nohf 40 | $(call Package/prometheus-node-exporter/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/prometheus-node-exporter/description 46 | Prometheus exporter for hardware and OS metrics exposed by *NIX 47 | kernels, written in Go with pluggable metric collectors. 48 | endef 49 | 50 | Package/prometheus-node-exporter_nohf/description=$(Package/prometheus-node-exporter/description) 51 | 52 | GO_BUILD_ARGS += -a 53 | 54 | GO_LDFLAGS += \ 55 | -X 'github.com/prometheus/common/version.Version=v$(PKG_VERSION)' \ 56 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 57 | -X 'github.com/prometheus/common/version.Branch="release"' \ 58 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 59 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 60 | 61 | GO_TAGS:=netgo, osusergo, static_build 62 | 63 | define Package/prometheus-node-exporter/install 64 | $(INSTALL_DIR) $(1)/opt/bin 65 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/node_exporter $(1)/opt/bin 66 | $(INSTALL_DIR) $(1)/opt/etc/init.d 67 | $(INSTALL_BIN) ./files/S99node_exporter $(1)/opt/etc/init.d 68 | endef 69 | 70 | Package/prometheus-node-exporter_nohf/install=$(Package/prometheus-node-exporter/install) 71 | 72 | $(eval $(call BuildPackage,prometheus-node-exporter)) 73 | $(eval $(call BuildPackage,prometheus-node-exporter_nohf)) 74 | -------------------------------------------------------------------------------- /prometheus-node-exporter/files/S99node_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=node_exporter 5 | ARGS="" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /prometheus-snmp-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=prometheus-snmp-exporter 8 | PKG_VERSION:=0.29.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-04-23 13 | PKG_SOURCE_VERSION:=42f8f2a991516b39ed60ef67eb69263d817ecd52 14 | PKG_SOURCE_URL:=https://github.com/prometheus/snmp_exporter 15 | PKG_MIRROR_HASH:=68b12a59d9425736d5c0c473e719d8230e0e241f4db62950748185179aad8aea 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_DEPENDS:=net-snmp 21 | PKG_BUILD_PARALLEL:=1 22 | PKG_CGO_ENABLED:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/prometheus-snmp-exporter/Default 28 | SECTION:=utils 29 | CATEGORY:=Utilities 30 | SUBMENU:=prometheus tools 31 | TITLE:=SNMP Exporter for Prometheus 32 | URL:=https://prometheus.io/ 33 | MAINTAINER:=Entware team, https://entware.net 34 | endef 35 | 36 | define Package/prometheus-snmp-exporter 37 | $(call Package/prometheus-snmp-exporter/Default) 38 | VARIANT:=hf 39 | endef 40 | 41 | define Package/prometheus-snmp-exporter_nohf 42 | $(call Package/prometheus-snmp-exporter/Default) 43 | VARIANT:=nohf 44 | DEPENDS:=@arm 45 | endef 46 | 47 | define Package/prometheus-snmp-exporter/description 48 | This exporter is the recommended way to expose SNMP data 49 | in a format which Prometheus can ingest. 50 | endef 51 | 52 | Package/prometheus-snmp-exporter_nohf/description=$(Package/prometheus-snmp-exporter/description) 53 | 54 | GO_BUILD_ARGS += -a 55 | 56 | GO_LDFLAGS += \ 57 | -X 'github.com/prometheus/common/version.Version=v$(PKG_VERSION)' \ 58 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 59 | -X 'github.com/prometheus/common/version.Branch="release"' \ 60 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 61 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 62 | 63 | GO_TAGS:=netgo 64 | 65 | define Package/prometheus-snmp-exporter/install 66 | $(INSTALL_DIR) $(1)/opt/bin 67 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/snmp_exporter $(1)/opt/bin 68 | $(INSTALL_DIR) $(1)/opt/etc/init.d 69 | $(INSTALL_BIN) ./files/S99snmp_exporter $(1)/opt/etc/init.d 70 | $(INSTALL_DIR) $(1)/opt/etc/prometheus/snmp_exporter 71 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/snmp.yml $(1)/opt/etc/prometheus/snmp_exporter 72 | endef 73 | 74 | Package/prometheus-snmp-exporter_nohf/install=$(Package/prometheus-snmp-exporter/install) 75 | 76 | $(eval $(call BuildPackage,prometheus-snmp-exporter)) 77 | $(eval $(call BuildPackage,prometheus-snmp-exporter_nohf)) 78 | -------------------------------------------------------------------------------- /prometheus-snmp-exporter/files/S99snmp_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=snmp_exporter 5 | ARGS="--config.file=/opt/etc/prometheus/snmp_exporter/snmp.yml" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /prometheus-statsd-exporter/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=prometheus-statsd-exporter 8 | PKG_VERSION:=0.28.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2024-10-25 13 | PKG_SOURCE_VERSION:=c0a390a2c43f77863278615b47d46e886bdca726 14 | PKG_SOURCE_URL:=https://github.com/prometheus/statsd_exporter 15 | PKG_MIRROR_HASH:=adc968e65987e1f18cbcd170d35287ae3ac062271cf91bfacea7fd7f81d98abf 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/prometheus-statsd-exporter/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | SUBMENU:=prometheus tools 29 | TITLE:=StatsD to Prometheus metrics exporter 30 | URL:=https://prometheus.io/ 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/prometheus-statsd-exporter 35 | $(call Package/prometheus-statsd-exporter/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/prometheus-statsd-exporter_nohf 40 | $(call Package/prometheus-statsd-exporter/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/prometheus-statsd-exporter/description 46 | statsd_exporter receives StatsD-style metrics and exports them 47 | as Prometheus metrics. 48 | endef 49 | 50 | Package/prometheus-statsd-exporter_nohf/description=$(Package/prometheus-statsd-exporter/description) 51 | 52 | define Package/prometheus-statsd-exporter/conffiles 53 | /opt/etc/prometheus/statsd_mapping.yml 54 | endef 55 | 56 | Package/prometheus-statsd-exporter_nohf/conffiles=$(Package/prometheus-statsd-exporter/conffiles) 57 | 58 | GO_BUILD_ARGS += -a 59 | 60 | GO_LDFLAGS += \ 61 | -X 'github.com/prometheus/common/version.Version=$(PKG_VERSION)' \ 62 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 63 | -X 'github.com/prometheus/common/version.Branch="release"' \ 64 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 65 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 66 | 67 | GO_TAGS:=netgo, static_build 68 | 69 | define Package/prometheus-statsd-exporter/install 70 | $(INSTALL_DIR) $(1)/opt/bin 71 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/statsd_exporter $(1)/opt/bin 72 | $(INSTALL_DIR) $(1)/opt/etc/init.d 73 | $(INSTALL_BIN) ./files/S99statsd_exporter $(1)/opt/etc/init.d 74 | $(INSTALL_DIR) $(1)/opt/etc/prometheus 75 | $(INSTALL_DATA) ./files/statsd_mapping.yml $(1)/opt/etc/prometheus 76 | endef 77 | 78 | Package/prometheus-statsd-exporter_nohf/install=$(Package/prometheus-statsd-exporter/install) 79 | 80 | $(eval $(call BuildPackage,prometheus-statsd-exporter)) 81 | $(eval $(call BuildPackage,prometheus-statsd-exporter_nohf)) 82 | -------------------------------------------------------------------------------- /prometheus-statsd-exporter/files/S99statsd_exporter: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=statsd_exporter 5 | ARGS="--statsd.mapping-config=/opt/etc/prometheus/statsd_mapping.yml" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /prometheus-statsd-exporter/files/statsd_mapping.yml: -------------------------------------------------------------------------------- 1 | # for tests from https://github.com/prometheus/statsd_exporter#global-defaults 2 | 3 | defaults: 4 | observer_type: histogram 5 | histogram_options: 6 | buckets: [.005, .01, .025, .05, .1, .25, .5, 1, 2.5 ] 7 | summary_options: 8 | quantiles: 9 | - quantile: 0.99 10 | error: 0.001 11 | - quantile: 0.95 12 | error: 0.01 13 | - quantile: 0.9 14 | error: 0.05 15 | - quantile: 0.5 16 | error: 0.005 17 | max_age: 5m 18 | age_buckets: 2 19 | buf_cap: 1000 20 | match_type: glob 21 | glob_disable_ordering: false 22 | ttl: 0 # metrics do not expire 23 | mappings: 24 | # This will be a histogram using the buckets set in `defaults`. 25 | - match: "test.timing.*.*.*" 26 | name: "my_timer" 27 | labels: 28 | provider: "$2" 29 | outcome: "$3" 30 | job: "${1}_server" 31 | # This will be a summary using the summary_options set in `defaults` 32 | - match: "other.distribution.*.*.*" 33 | observer_type: summary 34 | name: "other_distribution" 35 | labels: 36 | provider: "$2" 37 | outcome: "$3" 38 | job: "${1}_server_other" 39 | -------------------------------------------------------------------------------- /prometheus/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=prometheus 8 | PKG_VERSION:=3.4.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-05-17 13 | PKG_SOURCE_VERSION:=546b1d242e209ed4228aa01a248dbf3e41e573ea 14 | PKG_SOURCE_URL:=https://github.com/prometheus/prometheus 15 | PKG_MIRROR_HASH:=c0aa4231235e23dc942da8b3a483c7bd917e03b522b0ee4ce38e1a40a0a5aefe 16 | 17 | PKG_LICENSE:=Apache-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/prometheus/Default 26 | SECTION:=utils 27 | CATEGORY:=Utilities 28 | SUBMENU:=prometheus tools 29 | TITLE:=Monitoring system and time series database 30 | URL:=http://prometheus.io 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/prometheus 35 | $(call Package/prometheus/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/prometheus_nohf 40 | $(call Package/prometheus/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/prometheus/description 46 | Prometheus, a Cloud Native Computing Foundation project, 47 | is a systems and service monitoring system. It collects 48 | metrics from configured targets at given intervals, evaluates 49 | rule expressions, displays the results, and can trigger alerts 50 | when specified conditions are observed. 51 | endef 52 | 53 | Package/prometheus_nohf/description=$(Package/prometheus/description) 54 | 55 | define Package/prometheus/conffiles 56 | /opt/etc/prometheus/prometheus.yml 57 | endef 58 | 59 | Package/prometheus_nohf/conffiles=$(Package/prometheus/conffiles) 60 | 61 | WEB_FILE:=$(PKG_NAME)-web-ui-$(PKG_VERSION).tar.gz 62 | define Download/prometheus-web-ui 63 | URL:=https://github.com/prometheus/prometheus/releases/download/v$(PKG_VERSION)/ 64 | URL_FILE:=$(WEB_FILE) 65 | FILE:=$(WEB_FILE) 66 | HASH:=19ceafadf839b8d64b8f0e14f591edcb076add8f789297d981b3650b4ac5d79d 67 | endef 68 | 69 | GO_BUILD_ARGS += -a 70 | 71 | GO_LDFLAGS += \ 72 | -X 'github.com/prometheus/common/version.Version=v$(PKG_VERSION)' \ 73 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 74 | -X 'github.com/prometheus/common/version.Branch="release"' \ 75 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 76 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 77 | 78 | GO_TAGS:=builtinassets, netgo 79 | 80 | GO_TARGET:=./cmd/... 81 | 82 | GO_VARS += GO111MODULE=on 83 | 84 | define Build/Web 85 | $(HOST_TAR) -xzf $(DL_DIR)/$(WEB_FILE) -C $(PKG_BUILD_DIR)/web/ui 86 | ( cd $(PKG_BUILD_DIR)/web/ui; \ 87 | $(FIND) ./static -type f -a -name "*.map" -delete; ) 88 | ( cd $(PKG_BUILD_DIR); $(SHELL) scripts/compress_assets.sh; ) 89 | ( cd $(PKG_BUILD_DIR); $(GO_BIN_GENERATE) -tags plugins ./plugins; ) 90 | endef 91 | 92 | define Build/Compile 93 | $(call Build/Web) 94 | $(call Build/Compile/Go) 95 | endef 96 | 97 | define Package/prometheus/install 98 | $(INSTALL_DIR) $(1)/opt/bin 99 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/prom{etheus,tool} $(1)/opt/bin 100 | $(INSTALL_DIR) $(1)/opt/etc/prometheus 101 | $(INSTALL_DATA) \ 102 | $(PKG_BUILD_DIR)/documentation/examples/prometheus.yml \ 103 | $(1)/opt/etc/prometheus 104 | $(INSTALL_DIR) $(1)/opt/etc/init.d 105 | $(INSTALL_BIN) ./files/S70prometheus $(1)/opt/etc/init.d 106 | $(INSTALL_DIR) $(1)/opt/var/lib/prometheus 107 | endef 108 | 109 | Package/prometheus_nohf/install=$(Package/prometheus/install) 110 | 111 | $(eval $(call Download,prometheus-web-ui)) 112 | $(eval $(call BuildPackage,prometheus)) 113 | $(eval $(call BuildPackage,prometheus_nohf)) 114 | -------------------------------------------------------------------------------- /prometheus/files/S70prometheus: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=prometheus 5 | ARGS="--config.file=/opt/etc/$PROCS/$PROCS.yml --storage.tsdb.path=/opt/var/lib/$PROCS" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /promlens/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | # 5 | # XXX mips(el): modernc.org/libc/**: build constraints exclude all Go files in *** 6 | 7 | include $(TOPDIR)/rules.mk 8 | 9 | PKG_NAME:=promlens 10 | PKG_VERSION:=0.3.0 11 | PKG_RELEASE:=1 12 | 13 | PKG_SOURCE_PROTO:=git 14 | PKG_SOURCE_DATE:=2022-12-05 15 | PKG_SOURCE_VERSION:=759372f2207b1c8e46c210e822b5e8fdc92ea6a7 16 | PKG_SOURCE_URL:=https://github.com/prometheus/promlens 17 | PKG_MIRROR_HASH:=0104665451f56178e00d4b936310f75b7d2de767bfce101923f332c220b7d9ac 18 | 19 | PKG_LICENSE:=Apache-2.0 20 | PKG_LICENSE_FILES:=LICENSE 21 | 22 | PKG_BUILD_DEPENDS:=node/host 23 | PKG_BUILD_PARALLEL:=1 24 | 25 | include $(INCLUDE_DIR)/package.mk 26 | include $(INCLUDE_DIR)/golang.mk 27 | 28 | define Package/promlens/Default 29 | SECTION:=utils 30 | CATEGORY:=Utilities 31 | SUBMENU:=prometheus tools 32 | TITLE:=The query builder, analyzer, and explainer for PromQL 33 | URL:=http://prometheus.io 34 | MAINTAINER:=Entware team, https://entware.net 35 | DEPENDS:=@!(mips||mipsel) 36 | endef 37 | 38 | define Package/promlens 39 | $(call Package/promlens/Default) 40 | VARIANT:=hf 41 | endef 42 | 43 | define Package/promlens_nohf 44 | $(call Package/promlens/Default) 45 | VARIANT:=nohf 46 | DEPENDS+=@arm 47 | endef 48 | 49 | define Package/promlens/description 50 | PromLens is a web-based PromQL query builder, analyzer, and visualizer. 51 | endef 52 | 53 | Package/promlens_nohf/description=$(Package/promlens/description) 54 | 55 | GO_BUILD_ARGS += -a 56 | 57 | GO_LDFLAGS += \ 58 | -X 'github.com/prometheus/common/version.Version=v$(PKG_VERSION)' \ 59 | -X 'github.com/prometheus/common/version.Revision=$(COMMIT_SHORT)' \ 60 | -X 'github.com/prometheus/common/version.Branch="release"' \ 61 | -X 'github.com/prometheus/common/version.BuildUser=Entware@Entware' \ 62 | -X 'github.com/prometheus/common/version.BuildDate=$(PKG_SOURCE_DATE)' 63 | 64 | GO_TAGS:=builtinassets, netgo 65 | 66 | GO_TARGET:=./cmd/promlens 67 | 68 | define Build/Compile 69 | ( cd $(PKG_BUILD_DIR)/app; \ 70 | CI=false PUBLIC_URL=. npm install; \ 71 | CI=false NODE_OPTIONS=--openssl-legacy-provider \ 72 | PUBLIC_URL=. npm run build; \ 73 | ) 74 | ( cd $(PKG_BUILD_DIR); $(SHELL) scripts/compress_assets.sh; ) 75 | $(call Build/Compile/Go) 76 | endef 77 | 78 | define Package/promlens/install 79 | $(INSTALL_DIR) $(1)/opt/bin 80 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/promlens $(1)/opt/bin 81 | endef 82 | 83 | Package/promlens_nohf/install=$(Package/promlens/install) 84 | 85 | $(eval $(call BuildPackage,promlens)) 86 | $(eval $(call BuildPackage,promlens_nohf)) 87 | -------------------------------------------------------------------------------- /rclone/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2016-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=rclone 8 | PKG_VERSION:=1.69.2 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/rclone/rclone 14 | PKG_MIRROR_HASH:=054096dab1cbe03cefa200e6f43569a14024423d10e1add1539fcdcc7e5c7ab0 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/rclone/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=File Transfer 28 | TITLE:=rsync for cloud storage 29 | URL:=https://rclone.org 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/rclone 34 | $(call Package/rclone/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/rclone_nohf 39 | $(call Package/rclone/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/rclone/description 45 | Rclone is a command line program to sync files and directories to and from: 46 | Google Drive 47 | Amazon S3 48 | Openstack Swift / Rackspace cloud files / Memset Memstore 49 | Dropbox 50 | Google Cloud Storage 51 | Amazon Cloud Drive 52 | Microsoft One Drive 53 | Hubic 54 | Backblaze B2 55 | Yandex Disk 56 | The local filesystem 57 | endef 58 | 59 | Package/rclone_nohf/description=$(Package/rclone/description) 60 | 61 | define Build/Prepare 62 | $(call Build/Prepare/Default) 63 | ifeq ($(or $(CONFIG_mips),$(CONFIG_mipsel)),y) 64 | $(SED) '/mount2/d' $(PKG_BUILD_DIR)/cmd/all/all.go 65 | endif 66 | endef 67 | 68 | GO_LDFLAGS += \ 69 | -X '$(XIMPORTPATH)/fs.Version=$(PKG_VERSION)' 70 | 71 | GO_TAGS:=noselfupdate 72 | GO_VARS += GO111MODULE=on 73 | 74 | define Package/rclone/install 75 | $(INSTALL_DIR) $(1)/opt/bin 76 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/$(PKG_NAME) $(1)/opt/bin 77 | $(INSTALL_DIR) $(1)/opt/var/cache/rclone 78 | endef 79 | 80 | Package/rclone_nohf/install=$(Package/rclone/install) 81 | 82 | $(eval $(call BuildPackage,rclone)) 83 | $(eval $(call BuildPackage,rclone_nohf)) 84 | -------------------------------------------------------------------------------- /rclone/patches/500-conf-path.patch: -------------------------------------------------------------------------------- 1 | --- a/fs/config/config.go 2 | +++ b/fs/config/config.go 3 | @@ -128,8 +128,8 @@ func init() { 4 | fs.ConfigFileHasSection = func(section string) bool { 5 | return LoadedData().HasSection(section) 6 | } 7 | - configPath = makeConfigPath() 8 | - cacheDir = makeCacheDir() // Has fallback to tempDir, so set that first 9 | + configPath = "/opt/etc/rclone.config" 10 | + cacheDir = "/opt/var/cache/rclone" 11 | data = newDefaultStorage() 12 | } 13 | 14 | -------------------------------------------------------------------------------- /restic-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=restic 8 | PKG_VERSION:=0.18.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/restic/restic 14 | PKG_MIRROR_HASH:=7808ee49c2069410fa2440d1eef7c3fd61b26bb1a332d2b793e76155153dd721 15 | 16 | PKG_LICENSE:=BSD-2-Clause 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/restic-go/Default 25 | SECTION:=utils 26 | CATEGORY:=Utilities 27 | SUBMENU:=Backup 28 | TITLE:=Fast, secure, efficient backup program 29 | URL:=https://restic.net 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/restic-go 34 | $(call Package/restic-go/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/restic-go_nohf 39 | $(call Package/restic-go/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/restic-go/description 45 | restic is a backup program that is fast, efficient and secure. 46 | It supports the three major operating systems (Linux, macOS, Windows) and a 47 | few smaller ones (FreeBSD, OpenBSD). 48 | endef 49 | 50 | Package/restic-go_nohf/description=$(Package/restic-go/description) 51 | 52 | GO_TAGS:=disable_grpc_modules 53 | 54 | GO_TARGET:=./cmd/restic 55 | 56 | define Package/restic-go/install 57 | $(INSTALL_DIR) $(1)/opt/bin 58 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/restic $(1)/opt/bin/ 59 | endef 60 | 61 | Package/restic-go_nohf/install=$(Package/restic-go/install) 62 | 63 | $(eval $(call BuildPackage,restic-go)) 64 | $(eval $(call BuildPackage,restic-go_nohf)) 65 | -------------------------------------------------------------------------------- /sftpgo/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=sftpgo 8 | PKG_VERSION:=2.6.6 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-02-24 13 | PKG_SOURCE_VERSION:=6825db76ad7ee5fd55162f1d8226a44b31470eb5 14 | PKG_SOURCE_URL:=https://github.com/drakkan/sftpgo 15 | PKG_MIRROR_HASH:=2cda8921a658c226c65cda858b5d795da3082614d82331586b923beff5f4f0c2 16 | 17 | PKG_LICENSE:=AGPL-3.0-only 18 | PKG_LICENSE_FILES:=LICENSE 19 | PKG_MAINTAINER:=Entware team, https://entware.net 20 | 21 | PKG_BUILD_PARALLEL:=1 22 | PKG_CGO_ENABLED:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/sftpgo/Default 28 | SECTION:=net 29 | CATEGORY:=Network 30 | SUBMENU:=File Transfer 31 | TITLE:=SFTP server 32 | URL:=https://sftpgo.com/ 33 | endef 34 | 35 | define Package/sftpgo 36 | $(call Package/sftpgo/Default) 37 | VARIANT:=hf 38 | endef 39 | 40 | define Package/sftpgo_nohf 41 | $(call Package/sftpgo/Default) 42 | VARIANT:=nohf 43 | DEPENDS:=@arm 44 | endef 45 | 46 | define Package/sftpgo/description 47 | Fully featured and highly configurable SFTP server with optional 48 | HTTP/S, FTP/S and WebDAV support. 49 | Supported storage backends: local filesystem, encrypted local filesystem, S3 50 | (compatible) Object Storage, Google Cloud Storage, Azure Blob Storage, other 51 | SFTP servers. 52 | endef 53 | 54 | Package/sftpgo_nohf/description=$(Package/sftpgo/description) 55 | 56 | # https://github.com/drakkan/sftpgo/blob/main/docs/build-from-source.md 57 | # FEATURES=nogcs,nos3,noazblob,nobolt,nomysql,nopgsql,nosqlite,noportable,nometrics,bundle,unixcrypt 58 | 59 | GO_LDFLAGS += \ 60 | -X '$(XIMPORTPATH)/v2/internal/version.commit=$(COMMIT_SHORT)' \ 61 | -X '$(XIMPORTPATH)/v2/internal/version.date=$(PKG_SOURCE_DATE)' 62 | 63 | GO_TAGS:=nobolt, nomysql, nopgsql, unixcrypt 64 | 65 | define Package/sftpgo/install 66 | $(INSTALL_DIR) $(1)/opt/etc/init.d 67 | $(INSTALL_BIN) ./files/S21sftpgo $(1)/opt/etc/init.d 68 | $(INSTALL_DIR) $(1)/opt/etc/sftpgo 69 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/sftpgo.json $(1)/opt/etc/sftpgo 70 | $(INSTALL_DIR) $(1)/opt/sbin 71 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/sftpgo $(1)/opt/sbin/sftpgo 72 | $(INSTALL_DIR) $(1)/opt/share/sftpgo 73 | $(CP) $(PKG_BUILD_DIR)/{openapi,static,templates} $(1)/opt/share/sftpgo 74 | $(INSTALL_DIR) $(1)/opt/srv/sftpgo/{data,backups} 75 | $(INSTALL_DIR) $(1)/opt/var/lib/sftpgo/certs 76 | endef 77 | 78 | Package/sftpgo_nohf/install=$(Package/sftpgo/install) 79 | 80 | $(eval $(call BuildPackage,sftpgo)) 81 | $(eval $(call BuildPackage,sftpgo_nohf)) 82 | -------------------------------------------------------------------------------- /sftpgo/files/S21sftpgo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=sftpgo 5 | ARGS="serve -c /opt/etc/sftpgo -l /opt/var/log/sftpgo.log --log-level error" 6 | PREARGS="" 7 | DESC="SFTPGo" 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /sftpgo/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/internal/config/config_linux.go 2 | +++ b/internal/config/config_linux.go 3 | @@ -21,7 +21,6 @@ import "github.com/spf13/viper" 4 | 5 | // linux specific config search path 6 | func setViperAdditionalConfigPaths() { 7 | + viper.AddConfigPath("/opt/etc/sftpgo") 8 | viper.AddConfigPath("$HOME/.config/sftpgo") 9 | - viper.AddConfigPath("/etc/sftpgo") 10 | - viper.AddConfigPath("/usr/local/etc/sftpgo") 11 | } 12 | --- a/internal/util/resources.go 13 | +++ b/internal/util/resources.go 14 | @@ -39,8 +39,7 @@ func FindSharedDataPath(name, searchDir 15 | searchList = append(searchList, additionalSharedDataSearchPath) 16 | } 17 | if runtime.GOOS != osWindows { 18 | - searchList = append(searchList, "/usr/share/sftpgo") 19 | - searchList = append(searchList, "/usr/local/share/sftpgo") 20 | + searchList = append(searchList, "/opt/share/sftpgo") 21 | } 22 | searchList = RemoveDuplicates(searchList, false) 23 | for _, basePath := range searchList { 24 | --- a/sftpgo.json 25 | +++ b/sftpgo.json 26 | @@ -70,7 +70,7 @@ 27 | "domains": [], 28 | "email": "", 29 | "key_type": "4096", 30 | - "certs_path": "certs", 31 | + "certs_path": "/opt/var/lib/sftpgo/certs", 32 | "ca_endpoint": "https://acme-v02.api.letsencrypt.org/directory", 33 | "renew_days": 30, 34 | "http01_challenge": { 35 | @@ -201,7 +201,7 @@ 36 | }, 37 | "data_provider": { 38 | "driver": "sqlite", 39 | - "name": "sftpgo.db", 40 | + "name": "/opt/var/lib/sftpgo/sftpgo.db", 41 | "host": "", 42 | "port": 0, 43 | "username": "", 44 | @@ -217,7 +217,7 @@ 45 | "track_quota": 2, 46 | "delayed_quota_update": 0, 47 | "pool_size": 0, 48 | - "users_base_dir": "", 49 | + "users_base_dir": "/opt/srv/sftpgo/data", 50 | "actions": { 51 | "execute_on": [], 52 | "execute_for": [], 53 | @@ -259,7 +259,7 @@ 54 | "port": 0, 55 | "proto": "http" 56 | }, 57 | - "backups_path": "backups" 58 | + "backups_path": "/opt/srv/sftpgo/backups" 59 | }, 60 | "httpd": { 61 | "bindings": [ 62 | -------------------------------------------------------------------------------- /shell2http/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2011-2021 Entware 3 | # 4 | # This is free software, licensed under the GNU General Public License v2. 5 | # See /LICENSE for more information. 6 | # 7 | 8 | include $(TOPDIR)/rules.mk 9 | 10 | PKG_NAME:=shell2http 11 | PKG_VERSION:=2024-03-23 12 | PKG_RELEASE:=1 13 | 14 | _PKG_VERSION:=1.17.0 15 | 16 | PKG_SOURCE_PROTO:=git 17 | PKG_SOURCE_VERSION:=1ccddb63ffa9211d27d3cfb23e763e785279f05e 18 | PKG_SOURCE_URL:=https://github.com/msoap/shell2http 19 | PKG_MIRROR_HASH:=08e232097aefaaf374dbe701b8d6afae0eb954afa2f4a468a6269595f5edb13a 20 | 21 | PKG_BUILD_PARALLEL:=1 22 | 23 | include $(INCLUDE_DIR)/package.mk 24 | include $(INCLUDE_DIR)/golang.mk 25 | 26 | define Package/shell2http/Default 27 | SECTION:=net 28 | CATEGORY:=Network 29 | TITLE:=Execute shell commands via simple http server 30 | URL:=https://github.com/msoap/shell2http 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/shell2http 35 | $(call Package/shell2http/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/shell2http_nohf 40 | $(call Package/shell2http/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/shell2http/description 46 | Executing shell commands via simple http server (written in Go language). 47 | Settings through 2 command line arguments, path and shell command. 48 | By default bind to :8080. 49 | endef 50 | 51 | Package/shell2http_nohf/description=$(Package/shell2http/description) 52 | 53 | GO_LDFLAGS += \ 54 | -X 'main.version=$(_PKG_VERSION)' 55 | 56 | GO_VARS += GO111MODULE=on 57 | 58 | define Package/shell2http/install 59 | $(INSTALL_DIR) $(1)/opt/bin 60 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/$(PKG_NAME) $(1)/opt/bin 61 | endef 62 | 63 | Package/shell2http_nohf/install=$(Package/shell2http/install) 64 | 65 | $(eval $(call BuildPackage,shell2http)) 66 | $(eval $(call BuildPackage,shell2http_nohf)) 67 | -------------------------------------------------------------------------------- /sing-box-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=sing-box 8 | PKG_VERSION:=1.11.11 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/SagerNet/sing-box 14 | PKG_MIRROR_HASH:=dca1204da7d32f8430d7f92d308d97d0d98af7ded71ad9d48aa77bf069269942 15 | 16 | PKG_LICENSE:=GPL-3.0-or-later 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/sing-box-go/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=VPN 28 | TITLE:=The universal proxy platform 29 | URL:=https://sing-box.sagernet.org 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/sing-box-go 34 | $(call Package/sing-box-go/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/sing-box-go_nohf 39 | $(call Package/sing-box-go/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/sing-box-go/description 45 | Sing-box is a fast, customizable and univsersal proxy platform that 46 | can be used to create network proxy servers, clients and transparent proxies. 47 | endef 48 | 49 | Package/sing-box-go_nohf/description=$(Package/sing-box-go/description) 50 | 51 | define Package/sing-box-go/conffiles 52 | /opt/etc/sing-box/config.json 53 | endef 54 | 55 | Package/sing-box-go_nohf/conffiles=$(Package/sing-box-go/conffiles) 56 | 57 | XIMPORTPATH:=$(call tolower,$(XIMPORTPATH)) 58 | 59 | GO_LDFLAGS += \ 60 | -X '$(XIMPORTPATH)/constant.Version=$(PKG_VERSION)' 61 | 62 | GO_TARGET:=./cmd/sing-box 63 | 64 | GO_TAGS:= \ 65 | with_acme, \ 66 | with_clash_api, \ 67 | with_dhcp, \ 68 | with_ech, \ 69 | with_embedded_tor, \ 70 | with_grpc, \ 71 | with_gvisor, \ 72 | with_quic, \ 73 | with_reality_server, \ 74 | with_utls, \ 75 | with_v2ray_api, \ 76 | with_wireguard 77 | 78 | define Package/sing-box-go/install 79 | $(INSTALL_DIR) $(1)/opt/bin 80 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/sing-box $(1)/opt/bin 81 | $(INSTALL_DIR) $(1)/opt/etc/sing-box 82 | $(INSTALL_DATA) $(PKG_BUILD_DIR)/release/config/config.json $(1)/opt/etc/sing-box 83 | $(INSTALL_DIR) $(1)/opt/etc/init.d 84 | $(INSTALL_BIN) ./files/S99sing-box $(1)/opt/etc/init.d 85 | endef 86 | 87 | Package/sing-box-go_nohf/install=$(Package/sing-box-go/install) 88 | 89 | $(eval $(call BuildPackage,sing-box-go)) 90 | $(eval $(call BuildPackage,sing-box-go_nohf)) 91 | -------------------------------------------------------------------------------- /sing-box-go/files/S99sing-box: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=sing-box 5 | ARGS="run -D /opt/var/lib/sing-box -C /opt/etc/sing-box" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /sing-box-go/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/cmd/sing-box/cmd.go 2 | +++ b/cmd/sing-box/cmd.go 3 | @@ -66,7 +66,7 @@ func preRun(cmd *cobra.Command, args []s 4 | } 5 | } 6 | if len(configPaths) == 0 && len(configDirectories) == 0 { 7 | - configPaths = append(configPaths, "config.json") 8 | + configPaths = append(configPaths, "/opt/etc/sing-box/config.json") 9 | } 10 | globalCtx = service.ContextWith(globalCtx, deprecated.NewStderrManager(log.StdLogger())) 11 | globalCtx = box.Context(globalCtx, include.InboundRegistry(), include.OutboundRegistry(), include.EndpointRegistry()) 12 | --- a/constant/path_unix.go 13 | +++ b/constant/path_unix.go 14 | @@ -7,10 +7,8 @@ import ( 15 | ) 16 | 17 | func init() { 18 | - resourcePaths = append(resourcePaths, "/etc") 19 | - resourcePaths = append(resourcePaths, "/usr/share") 20 | - resourcePaths = append(resourcePaths, "/usr/local/etc") 21 | - resourcePaths = append(resourcePaths, "/usr/local/share") 22 | + resourcePaths = append(resourcePaths, "/opt/etc") 23 | + resourcePaths = append(resourcePaths, "/opt/share") 24 | if homeDir := os.Getenv("HOME"); homeDir != "" { 25 | resourcePaths = append(resourcePaths, homeDir+"/.local/share") 26 | } 27 | -------------------------------------------------------------------------------- /snowflake-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=snowflake 8 | PKG_VERSION:=2.11.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake 14 | PKG_MIRROR_HASH:=527006b3d71134267fac3a8c86be71a99bf7dbb2f969916c60f16bec8c245294 15 | 16 | PKG_LICENSE:=BSD-3-Clause 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/snowflake/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | TITLE:=Snowflake 28 | URL:=https://snowflake.torproject.org/ 29 | EXTRA_DEPENDS:=tor-geoip 30 | endef 31 | 32 | define Package/snowflake-go 33 | $(call Package/snowflake/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/snowflake-go_nohf 38 | $(call Package/snowflake/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/snowflake-go/description 44 | Snowflake is a system that allows people from all over the world to 45 | access censored websites and applications. Similar to how VPNs assist 46 | users in getting around Internet censorship, Snowflake helps you avoid 47 | being noticed by Internet censors by making your Internet activity appear 48 | as though you're using the Internet for a regular video or voice call. 49 | endef 50 | 51 | Package/snowflake-go_hf/description=$(Package/snowflake-go/description) 52 | 53 | GO_VARS += GO111MODULE=on 54 | GO_TARGET:=./broker ./client ./probetest ./proxy ./server 55 | 56 | BINS:=broker client probetest proxy server 57 | 58 | define Package/snowflake-go/install 59 | $(INSTALL_DIR) $(1)/opt/bin 60 | for bin in $(BINS); do \ 61 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/$$$$bin \ 62 | $(1)/opt/bin/snowflake-$$$$bin; \ 63 | done 64 | endef 65 | 66 | $(eval $(call BuildPackage,snowflake-go)) 67 | $(eval $(call BuildPackage,snowflake-go_nohf)) 68 | -------------------------------------------------------------------------------- /snowflake-go/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/broker/broker.go 2 | +++ b/broker/broker.go 3 | @@ -211,8 +211,8 @@ func main() { 4 | flag.StringVar(&keyFilename, "key", "", "TLS private key file") 5 | flag.StringVar(&acmeCertCacheDir, "acme-cert-cache", "acme-cert-cache", "directory in which certificates should be cached") 6 | flag.StringVar(&addr, "addr", ":443", "address to listen on") 7 | - flag.StringVar(&geoipDatabase, "geoipdb", "/usr/share/tor/geoip", "path to correctly formatted geoip database mapping IPv4 address ranges to country codes") 8 | - flag.StringVar(&geoip6Database, "geoip6db", "/usr/share/tor/geoip6", "path to correctly formatted geoip database mapping IPv6 address ranges to country codes") 9 | + flag.StringVar(&geoipDatabase, "geoipdb", "/opt/share/tor/geoip", "path to correctly formatted geoip database mapping IPv4 address ranges to country codes") 10 | + flag.StringVar(&geoip6Database, "geoip6db", "/opt/share/tor/geoip6", "path to correctly formatted geoip database mapping IPv6 address ranges to country codes") 11 | flag.StringVar(&bridgeListFilePath, "bridge-list-path", "", "file path for bridgeListFile") 12 | flag.StringVar(&allowedRelayPattern, "allowed-relay-pattern", "", "allowed pattern for relay host name. The broker will reject proxies whose AcceptedRelayPattern is more restrictive than this") 13 | flag.StringVar(&presumedPatternForLegacyClient, "default-relay-pattern", "", "presumed pattern for legacy client") 14 | -------------------------------------------------------------------------------- /syncthing/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2016-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=syncthing 8 | PKG_VERSION:=1.29.6 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-05-06 13 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 14 | PKG_SOURCE_URL:=https://github.com/syncthing/syncthing 15 | PKG_MIRROR_HASH:=59b8077d9db6f312e3af10b70505e0f61c7123979e6204d41a484723d2602a88 16 | 17 | PKG_LICENSE:=MPL-2.0 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_DEPENDS:=node/host 21 | PKG_BUILD_PARALLEL:=1 22 | 23 | include $(INCLUDE_DIR)/package.mk 24 | include $(INCLUDE_DIR)/golang.mk 25 | 26 | define Package/syncthing/Default 27 | SECTION:=net 28 | CATEGORY:=Network 29 | TITLE:=Utility for synchronization 30 | URL:=https://syncthing.net/ 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/syncthing 35 | $(call Package/syncthing/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/syncthing_nohf 40 | $(call Package/syncthing/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/syncthing/description 46 | Syncthing replaces proprietary sync and cloud services with something open, 47 | trustworthy and decentralized. Your data is your data alone and you deserve 48 | to choose where it is stored, if it is shared with some third party and how 49 | it's transmitted over the Internet. 50 | endef 51 | 52 | Package/syncthing_nohf/description=$(Package/syncthing/description) 53 | 54 | GO_LDFLAGS += \ 55 | -X '$(XIMPORTPATH)/lib/build.Version=v$(PKG_VERSION)' \ 56 | -X '$(XIMPORTPATH)/lib/build.Stamp=$(PKG_SOURCE_DATE)' \ 57 | -X '$(XIMPORTPATH)/lib/build.User=Entware' \ 58 | -X '$(XIMPORTPATH)/lib/build.Host=Entware' \ 59 | -X '$(XIMPORTPATH)/lib/build.Tags=noupgrade' 60 | 61 | GO_VARS += GO111MODULE=on 62 | 63 | GO_TAGS:=noupgrade 64 | 65 | GO_TARGET:=./cmd/syncthing 66 | 67 | define Build/Web 68 | ( cd $(PKG_BUILD_DIR); \ 69 | PATH="$(shell $(GO_BIN) env GOROOT)/bin:$(PATH)" \ 70 | $(GO_ENV_COMMON) $(GO_BIN) run \ 71 | $(if $(findstring s,$(OPENWRT_VERBOSE)),-v -x) \ 72 | build.go assets; \ 73 | ) 74 | endef 75 | 76 | define Build/Compile 77 | $(call Build/Web) 78 | $(call Build/Compile/Go) 79 | endef 80 | 81 | define Package/syncthing/install 82 | $(INSTALL_DIR) $(1)/opt/bin 83 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/syncthing $(1)/opt/bin 84 | $(INSTALL_DIR) $(1)/opt/etc/init.d 85 | $(INSTALL_BIN) ./files/S92syncthing $(1)/opt/etc/init.d 86 | endef 87 | 88 | Package/syncthing_nohf/install=$(Package/syncthing/install) 89 | 90 | $(eval $(call BuildPackage,syncthing)) 91 | $(eval $(call BuildPackage,syncthing_nohf)) 92 | -------------------------------------------------------------------------------- /syncthing/files/S92syncthing: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ ! -d "/opt/etc/syncthing" ]; then 4 | syncthing -generate="/opt/etc/syncthing" 5 | sed -i 's|127\.0\.0\.1|0.0.0.0|' /opt/etc/syncthing/config.xml 6 | elif [ -n "$(grep '127\.0\.0\.1' /opt/etc/syncthing/config.xml)" ]; then 7 | sed -i 's|127\.0\.0\.1|0.0.0.0|' /opt/etc/syncthing/config.xml 8 | fi 9 | 10 | ENABLED=yes 11 | PROCS=syncthing 12 | ARGS="serve" 13 | PREARGS="" 14 | DESC=$PROCS 15 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 16 | 17 | . /opt/etc/init.d/rc.func 18 | -------------------------------------------------------------------------------- /syncthing/patches/500-entware-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/lib/locations/locations.go 2 | +++ b/lib/locations/locations.go 3 | @@ -235,7 +235,7 @@ func unixConfigDir(userHome, xdgConfigHo 4 | } 5 | 6 | // Use our default 7 | - return filepath.Join(userHome, defaultStateDir) 8 | + return filepath.Join("/opt/etc", "syncthing") 9 | } 10 | 11 | // unixDataDir returns the default data directory, where we store the 12 | -------------------------------------------------------------------------------- /tailscale/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2021-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=tailscale 8 | PKG_VERSION:=1.82.5 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=e4d64c6faf827a308ec20b39651225178e6743c0 13 | PKG_SOURCE_URL:=https://github.com/tailscale/tailscale 14 | PKG_MIRROR_HASH:=9a4996f787f17bedc1b96cbb76ccdb9d4da24b827bcefd4f8f460abc2e516e10 15 | 16 | PKG_LICENSE:=BSD-3-Clause 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/tailscale/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=VPN 28 | TITLE:=Private WireGuard networks made easy 29 | URL:=https://tailscale.com/ 30 | MAINTAINER:=Entware team, https://entware.net 31 | EXTRA_DEPENDS:=ca-bundle, coreutils-nohup 32 | endef 33 | 34 | define Package/tailscale 35 | $(call Package/tailscale/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/tailscale_nohf 40 | $(call Package/tailscale/Default) 41 | VARIANT:=nohf 42 | DEPENDS:=@arm 43 | endef 44 | 45 | define Package/tailscale/description 46 | Zero config VPN. Installs on any device in minutes, manages 47 | firewall rules for you, and works from anywhere 48 | endef 49 | 50 | Package/tailscale_nohf/description=$(Package/tailscale/description) 51 | 52 | PKG_SHORT_VER:=$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(PKG_VERSION)))) 53 | 54 | GO_LDFLAGS += \ 55 | -X 'tailscale.com/version.longStamp=$(PKG_VERSION)' \ 56 | -X 'tailscale.com/version.shortStamp=$(PKG_SHORT_VER)' \ 57 | -X 'tailscale.com/version.gitCommitStamp=$(COMMIT_SHORT)' 58 | 59 | GO_VARS += GO111MODULE=on 60 | 61 | GO_TARGET:=./cmd/tailscale ./cmd/tailscaled 62 | 63 | define Package/tailscale/install 64 | $(INSTALL_DIR) $(1)/opt/bin 65 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/tailscale{,d} $(1)/opt/bin 66 | $(INSTALL_DIR) $(1)/opt/etc/init.d 67 | $(INSTALL_BIN) ./files/S06tailscaled $(1)/opt/etc/init.d/ 68 | endef 69 | 70 | Package/tailscale_nohf/install=$(Package/tailscale/install) 71 | 72 | $(eval $(call BuildPackage,tailscale)) 73 | $(eval $(call BuildPackage,tailscale_nohf)) 74 | -------------------------------------------------------------------------------- /tailscale/files/S06tailscaled: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=tailscaled 5 | ARGS="--state=/opt/var/tailscaled.state --statedir=/opt/var/lib/tailscale" 6 | PREARGS="nohup" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /tailscale/patches/010-entware-path.patch: -------------------------------------------------------------------------------- 1 | --- a/logpolicy/logpolicy.go 2 | +++ b/logpolicy/logpolicy.go 3 | @@ -390,7 +390,7 @@ func tryFixLogStateLocation(dir, cmdname 4 | existsInCache := false 5 | cacheDir := os.Getenv("CACHE_DIRECTORY") 6 | if cacheDir != "" { 7 | - existsInCache, err = checkExists("/var/cache/tailscale") 8 | + existsInCache, err = checkExists("/opt/var/cache/tailscale") 9 | if err != nil { 10 | logf("checking for configs in %s: %v", cacheDir, err) 11 | } 12 | --- a/paths/paths.go 13 | +++ b/paths/paths.go 14 | @@ -42,8 +42,8 @@ func DefaultTailscaledSocket() string { 15 | case distro.QNAP: 16 | return "/tmp/tailscale/tailscaled.sock" 17 | } 18 | - if fi, err := os.Stat("/var/run"); err == nil && fi.IsDir() { 19 | - return "/var/run/tailscale/tailscaled.sock" 20 | + if fi, err := os.Stat("/opt/var/run"); err == nil && fi.IsDir() { 21 | + return "/opt/var/run/tailscale/tailscaled.sock" 22 | } 23 | return "tailscaled.sock" 24 | } 25 | --- a/paths/paths_unix.go 26 | +++ b/paths/paths_unix.go 27 | @@ -23,7 +23,7 @@ func init() { 28 | func statePath() string { 29 | switch runtime.GOOS { 30 | case "linux", "illumos", "solaris": 31 | - return "/var/lib/tailscale/tailscaled.state" 32 | + return "/opt/var/lib/tailscale/tailscaled.state" 33 | case "freebsd", "openbsd": 34 | return "/var/db/tailscale/tailscaled.state" 35 | case "darwin": 36 | -------------------------------------------------------------------------------- /telegraf/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2021-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=telegraf 8 | PKG_VERSION:=1.34.4 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=e7ce1e1e740b1983f86a0587ce67858bb67eb4d1 13 | PKG_SOURCE_URL:=https://github.com/influxdata/telegraf 14 | PKG_MIRROR_HASH:=1d7bddc89a88b811e077daf6168636ab82a617577c2014413effec9e08126c68 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/telegraf/Default 25 | SECTION:=utils 26 | CATEGORY:=Utilities 27 | TITLE:=server agent to help you collect metrics 28 | URL:=https://www.influxdata.com/time-series-platform/telegraf 29 | MAINTAINER:=Entware team, https://entware.net 30 | endef 31 | 32 | define Package/telegraf 33 | $(call Package/telegraf/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/telegraf_nohf 38 | $(call Package/telegraf/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/telegraf/description 44 | Telegraf is an agent for collecting, processing, aggregating, and 45 | writing metrics. Design goals are to have a minimal memory footprint with a 46 | plugin system so that developers in the community can easily add support for 47 | collecting metrics. 48 | endef 49 | 50 | Package/telegraf_nohf/description=$(Package/telegraf/description) 51 | 52 | GO_LDFLAGS += \ 53 | -X '$(XIMPORTPATH)/internal.Commit=$(COMMIT_SHORT)' \ 54 | -X '$(XIMPORTPATH)/internal.Branch=master' \ 55 | -X '$(XIMPORTPATH)/internal.Version=$(PKG_VERSION)' 56 | 57 | GO_TARGET:=./cmd/telegraf 58 | 59 | GO_VARS += GO111MODULE=on 60 | 61 | define Package/telegraf/install 62 | $(INSTALL_DIR) $(1)/opt/bin 63 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/telegraf $(1)/opt/bin 64 | endef 65 | 66 | Package/telegraf_nohf/install=$(Package/telegraf/install) 67 | 68 | $(eval $(call BuildPackage,telegraf)) 69 | $(eval $(call BuildPackage,telegraf_nohf)) 70 | -------------------------------------------------------------------------------- /torrserver/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2021-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=torrserver 8 | PKG_VERSION:=135 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=MatriX.$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/YouROK/TorrServer 14 | PKG_MIRROR_HASH:=c2a4ec9a1d7650420c0daa3ac6cdacfeccd9a7288c1d71ef6dd820cc72c0831e 15 | 16 | PKG_LICENSE:=GPL-3.0-only 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_DEPENDS:=node-yarn/host 20 | PKG_BUILD_PARALLEL:=1 21 | PKG_CGO_ENABLED:=1 22 | 23 | include $(INCLUDE_DIR)/package.mk 24 | include $(INCLUDE_DIR)/golang.mk 25 | 26 | define Package/torrserver/Default 27 | SECTION:=net 28 | CATEGORY:=Network 29 | SUBMENU:=BitTorrent 30 | TITLE:=stream torrent to http 31 | URL:=https://github.com/YouROK/TorrServer 32 | MAINTAINER:=Entware team, https://entware.net 33 | DEPENDS:=+libstdcpp 34 | endef 35 | 36 | define Package/torrserver 37 | $(call Package/torrserver/Default) 38 | VARIANT:=hf 39 | endef 40 | 41 | define Package/torrserver_nohf 42 | $(call Package/torrserver/Default) 43 | VARIANT:=nohf 44 | DEPENDS+=@arm 45 | endef 46 | 47 | define Package/torrserver/description 48 | torrserver is a server to stream torrent via http to torrserv client. 49 | endef 50 | 51 | Package/torrserver_nohf/description=$(Package/torrserver/description) 52 | 53 | GO_SRC_SUBDIR:=server 54 | GO_TAGS:=nosqlite 55 | GO_TARGET:=./cmd 56 | 57 | define Build/Web 58 | ( cd $(PKG_BUILD_DIR); \ 59 | NODE_OPTIONS=--openssl-legacy-provider \ 60 | $(GO_ENV_COMMON) $(GO_BIN) run \ 61 | $(if $(findstring s,$(OPENWRT_VERBOSE)),-v -x) \ 62 | gen_web.go; \ 63 | ) 64 | ( cd $(PKG_BUILD_DIR)/server; $(GO_BIN_MOD_TIDY); ) 65 | endef 66 | 67 | define Build/Compile 68 | $(call Build/Web) 69 | $(call Build/Compile/Go) 70 | endef 71 | 72 | define Package/torrserver/install 73 | $(INSTALL_DIR) $(1)/opt/sbin 74 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/cmd $(1)/opt/sbin/torrserver 75 | $(INSTALL_DIR) $(1)/opt/etc/init.d 76 | $(INSTALL_BIN) ./files/S90torrserver $(1)/opt/etc/init.d 77 | $(INSTALL_DIR) $(1)/opt/etc/torrserver 78 | touch $(1)/opt/etc/torrserver/.keep 79 | endef 80 | 81 | Package/torrserver_nohf/install=$(Package/torrserver/install) 82 | 83 | $(eval $(call BuildPackage,torrserver)) 84 | $(eval $(call BuildPackage,torrserver_nohf)) 85 | -------------------------------------------------------------------------------- /torrserver/files/S90torrserver: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=torrserver 5 | ARGS="-d /opt/etc/torrserver" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /v2ray-plugin/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=v2ray-plugin 8 | PKG_VERSION:=5.25.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/teddysun/v2ray-plugin 14 | PKG_MIRROR_HASH:=b2a2eaebe41e450f5cadeab97ebd746491f3c883cd8751d70468f53aeb954b40 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/v2ray-plugin/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | SUBMENU:=Web Servers/Proxies 29 | TITLE:=A SIP003 plugin based on v2ray 30 | URL:=https://github.com/teddysun/v2ray-plugin 31 | endef 32 | 33 | define Package/v2ray-plugin 34 | $(call Package/v2ray-plugin/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/v2ray-plugin_nohf 39 | $(call Package/v2ray-plugin/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/v2ray-plugin/description 45 | Yet another SIP003 plugin for shadowsocks, based on v2ray. 46 | endef 47 | 48 | Package/v2ray-plugin_nohf/description=$(Package/v2ray-plugin/description) 49 | 50 | GO_LDFLAGS += -X 'main.VERSION=v$(PKG_VERSION)' 51 | 52 | define Package/v2ray-plugin/install 53 | $(INSTALL_DIR) $(1)/opt/bin 54 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/v2ray-plugin $(1)/opt/bin 55 | endef 56 | 57 | Package/v2ray-plugin_nohf/install=$(Package/v2ray-plugin/install) 58 | 59 | $(eval $(call BuildPackage,v2ray-plugin)) 60 | $(eval $(call BuildPackage,v2ray-plugin_nohf)) 61 | -------------------------------------------------------------------------------- /v2ray/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2021-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=v2ray 8 | PKG_VERSION:=5.32.0 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2025-05-18 13 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 14 | PKG_SOURCE_URL:=https://github.com/v2fly/v2ray-core 15 | PKG_MIRROR_HASH:=48d50ec3cc13f5770564f5cc100aecc1c9417928a0b88239b44d4a2cc1ef125b 16 | 17 | PKG_LICENSE:=MIT 18 | PKG_LICENSE_FILES:=LICENSE 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/v2ray/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | SUBMENU:=Web Servers/Proxies 29 | TITLE:=proxy building platform 30 | URL:=https://www.v2fly.org 31 | MAINTAINER:=Entware team, https://entware.net 32 | endef 33 | 34 | define Package/v2ray-core 35 | $(call Package/v2ray/Default) 36 | VARIANT:=hf 37 | EXTRA_DEPENDS:=ca-bundle, v2ray-geoip, v2ray-geosite 38 | endef 39 | 40 | define Package/v2ray-core_nohf 41 | $(call Package/v2ray/Default) 42 | VARIANT:=nohf 43 | DEPENDS:=@arm 44 | EXTRA_DEPENDS:=ca-bundle, v2ray-geoip, v2ray-geosite 45 | endef 46 | 47 | define Package/v2ray 48 | $(call Package/v2ray/Default) 49 | TITLE+= (scripts & configs) 50 | VARIANT:=hf 51 | DEPENDS:=+v2ray-core 52 | endef 53 | 54 | define Package/v2ray_nohf 55 | $(call Package/v2ray/Default) 56 | TITLE+= (scripts & configs) 57 | VARIANT:=nohf 58 | DEPENDS:=+v2ray-core_nohf 59 | endef 60 | 61 | define Package/v2ray-core/description 62 | A platform for building proxies to bypass network restrictions. 63 | endef 64 | 65 | Package/v2ray-core_nohf/description=$(Package/v2ray-core/description) 66 | 67 | define Package/v2ray/description 68 | scripts & configs. 69 | endef 70 | 71 | Package/v2ray_nohf/description=$(Package/v2ray/description) 72 | 73 | define Package/v2ray/conffiles 74 | /opt/etc/v2ray/config.json 75 | /opt/etc/v2ray/vpoint_socks_vmess.json 76 | /opt/etc/v2ray/vpoint_vmess_freedom.json 77 | endef 78 | 79 | Package/v2ray_nohf/conffiles=$(Package/v2ray/conffiles) 80 | 81 | GO_LDFLAGS += \ 82 | -X '$(XIMPORTPATH)/v5.codename=Entware' \ 83 | -X '$(XIMPORTPATH)/v5.build=$(PKG_SOURCE_DATE)' \ 84 | -X '$(XIMPORTPATH)/v5.version=$(PKG_VERSION)' 85 | 86 | GO_TARGET:=./main 87 | 88 | GO_VARS += GO111MODULE=on 89 | 90 | define Package/v2ray-core/install 91 | $(INSTALL_DIR) $(1)/opt/sbin 92 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/main $(1)/opt/sbin/v2ray 93 | endef 94 | 95 | Package/v2ray-core_nohf/install=$(Package/v2ray-core/install) 96 | 97 | define Package/v2ray/install 98 | $(INSTALL_DIR) $(1)/opt/etc/init.d 99 | $(INSTALL_BIN) ./files/S24v2ray $(1)/opt/etc/init.d 100 | $(INSTALL_DIR) $(1)/opt/etc/v2ray 101 | $(INSTALL_CONF) $(PKG_BUILD_DIR)/release/config/*.json $(1)/opt/etc/v2ray 102 | endef 103 | 104 | Package/v2ray_nohf/install=$(Package/v2ray/install) 105 | 106 | $(eval $(call BuildPackage,v2ray-core)) 107 | $(eval $(call BuildPackage,v2ray-core_nohf)) 108 | $(eval $(call BuildPackage,v2ray)) 109 | $(eval $(call BuildPackage,v2ray_nohf)) 110 | -------------------------------------------------------------------------------- /v2ray/files/S24v2ray: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=v2ray 5 | ARGS="run -d /opt/etc/v2ray" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /v2ray/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/infra/conf/geodata/geodata.go 2 | +++ b/infra/conf/geodata/geodata.go 3 | @@ -11,7 +11,7 @@ type loader struct { 4 | } 5 | 6 | func (l *loader) LoadGeoSite(list string) ([]*routercommon.Domain, error) { 7 | - return l.LoadGeoSiteWithAttr("geosite.dat", list) 8 | + return l.LoadGeoSiteWithAttr("../share/v2ray/geosite.dat", list) 9 | } 10 | 11 | func (l *loader) LoadGeoSiteWithAttr(file string, siteWithAttr string) ([]*routercommon.Domain, error) { 12 | @@ -55,7 +55,7 @@ func (l *loader) LoadGeoSiteWithAttr(fil 13 | } 14 | 15 | func (l *loader) LoadGeoIP(country string) ([]*routercommon.CIDR, error) { 16 | - return l.LoadIP("geoip.dat", country) 17 | + return l.LoadIP("../share/v2ray/geoip.dat", country) 18 | } 19 | 20 | var loaders map[string]func() LoaderImplementation 21 | -------------------------------------------------------------------------------- /v2raya/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=v2rayA 8 | PKG_VERSION:=2.2.6.7 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/v2rayA/v2rayA 14 | PKG_MIRROR_HASH:=0250b87c23fa02919b39044a950e1934f73c124c559cb9adcbbb00aa720ff5b5 15 | 16 | PKG_LICENSE:=AGPL-3.0-only 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/v2raya/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | SUBMENU:=Web Servers/Proxies 29 | TITLE:=A Linux web GUI client of Project V 30 | URL:=https://v2raya.org 31 | DEPENDS:=+ca-bundle +iptables 32 | endef 33 | 34 | define Package/v2raya 35 | $(call Package/v2raya/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/v2raya_nohf 40 | $(call Package/v2raya/Default) 41 | VARIANT:=nohf 42 | DEPENDS+=@arm 43 | endef 44 | 45 | define Package/v2raya/description 46 | A web GUI client of Project V which supports VMess, 47 | VLESS, SS, SSR, Trojan, Tuic and Juicity protocols. 48 | endef 49 | 50 | Package/v2raya_nohf/description=$(Package/v2raya/description) 51 | 52 | GO_LDFLAGS += \ 53 | -X '$(XIMPORTPATH)/conf.Version=v$(PKG_VERSION)' 54 | 55 | GO_SRC_SUBDIR:=service 56 | 57 | GO_TAGS:=with_gvisor 58 | 59 | WEB_FILE:=$(PKG_NAME)-web-$(PKG_VERSION).tar.gz 60 | define Download/v2raya-web 61 | URL:=https://github.com/v2rayA/v2rayA/releases/download/v$(PKG_VERSION)/ 62 | URL_FILE:=web.tar.gz 63 | FILE:=$(WEB_FILE) 64 | HASH:=d871f119812979a20da3f57a792d7842dad4c4b528c8ec9e4a9aea29b8508147 65 | endef 66 | 67 | define Build/Prepare 68 | $(call Build/Prepare/Default) 69 | $(HOST_TAR) -xzf $(DL_DIR)/$(WEB_FILE) -C $(PKG_BUILD_DIR)/service/server/router 70 | endef 71 | 72 | define Package/v2raya/install 73 | $(INSTALL_DIR) $(1)/opt/bin 74 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/v2rayA $(1)/opt/bin/v2raya 75 | $(INSTALL_DIR) $(1)/opt/etc/init.d 76 | $(INSTALL_BIN) ./files/S24v2raya $(1)/opt/etc/init.d 77 | $(INSTALL_DIR) $(1)/opt/etc/v2raya 78 | $(INSTALL_DIR) $(1)/opt/share/v2ray 79 | endef 80 | 81 | Package/v2raya_nohf/install=$(Package/v2raya/install) 82 | 83 | $(eval $(call Download,v2raya-web)) 84 | $(eval $(call BuildPackage,v2raya)) 85 | $(eval $(call BuildPackage,v2raya_nohf)) 86 | -------------------------------------------------------------------------------- /v2raya/files/S24v2raya: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # V2Ray binary is xray by default (if xray installed) 4 | if [ -x "/opt/sbin/xray" ]; then 5 | V2RAY_BIN="-b /opt/sbin/xray" 6 | elif [ -x "/opt/sbin/v2ray" ]; then 7 | V2RAY_BIN="-b /opt/sbin/v2ray" 8 | else 9 | echo "v2ray or xray not installed" && exit 10 | fi 11 | 12 | ENABLED=yes 13 | PROCS=v2raya 14 | ARGS="$V2RAY_BIN -c /opt/etc/v2raya --v2ray-assetsdir /opt/share/v2ray 15 | --nftables-support off --log-file /opt/var/log/v2raya.log" 16 | PREARGS="" 17 | DESC=$PROCS 18 | PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 19 | 20 | . /opt/etc/init.d/rc.func 21 | -------------------------------------------------------------------------------- /v2raya/patches/010-fix-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/service/common/tools.go 2 | +++ b/service/common/tools.go 3 | @@ -177,7 +177,7 @@ func FillEmpty(toFill interface{}, defau 4 | // IsOpenWrt return true only if the operating system SHOULD be openwrt 5 | func IsOpenWrt() bool { 6 | if runtime.GOOS == "linux" { 7 | - if _, err := os.Stat("/etc/openwrt_release"); err == nil { 8 | + if _, err := os.Stat("/opt/etc/entware_release"); err == nil { 9 | return true 10 | } 11 | } 12 | --- a/service/conf/environmentConfig.go 13 | +++ b/service/conf/environmentConfig.go 14 | @@ -65,7 +65,7 @@ func initFunc() { 15 | params.Config = "$HOME/.config/v2raya" 16 | } 17 | } else { 18 | - params.Config = "/etc/v2raya" 19 | + params.Config = "/opt/etc/v2raya" 20 | } 21 | } 22 | // replace all dots of the filename with underlines 23 | --- a/service/core/v2ray/asset/asset.go 24 | +++ b/service/core/v2ray/asset/asset.go 25 | @@ -64,8 +64,8 @@ func GetV2rayLocationAsset(filename stri 26 | if runtime.GOOS != "windows" { 27 | searchPaths = append( 28 | searchPaths, 29 | - filepath.Join("/usr/local/share", folder, filename), 30 | - filepath.Join("/usr/share", folder, filename), 31 | + filepath.Join("/opt/share", folder, filename), 32 | + filepath.Join("/opt/usr/share", folder, filename), 33 | ) 34 | } 35 | for _, searchPath := range searchPaths { 36 | -------------------------------------------------------------------------------- /webtunnel/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2024-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=webtunnel 8 | PKG_VERSION:=0.0.2 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel 14 | PKG_MIRROR_HASH:=78eb07588dcf99b55fa5e4410e7f44af2c2e4ff3f03f847483615a2ac5609fe2 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/webtunnel/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | TITLE:=Pluggable Transport based on HTTP Upgrade(HTTPT) 29 | URL:=https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel 30 | endef 31 | 32 | define Package/webtunnel-client 33 | $(call Package/webtunnel/Default) 34 | VARIANT:=hf 35 | endef 36 | 37 | define Package/webtunnel-client_nohf 38 | $(call Package/webtunnel/Default) 39 | VARIANT:=nohf 40 | DEPENDS:=@arm 41 | endef 42 | 43 | define Package/webtunnel-server 44 | $(call Package/webtunnel/Default) 45 | VARIANT:=hf 46 | endef 47 | 48 | define Package/webtunnel-server_nohf 49 | $(call Package/webtunnel/Default) 50 | VARIANT:=nohf 51 | DEPENDS:=@arm 52 | endef 53 | 54 | define Package/webtunnel/description 55 | WebTunnel is pluggable transport that attempt to imitate web 56 | browsing activities based on HTTPT. 57 | endef 58 | 59 | Package/webtunnel-client/description=$(Package/webtunnel/description) 60 | Package/webtunnel-client_nohf/description=$(Package/webtunnel/description) 61 | Package/webtunnel-server/description=$(Package/webtunnel/description) 62 | Package/webtunnel-server_nohf/description=$(Package/webtunnel/description) 63 | 64 | GO_TARGET:=./main/client ./main/server 65 | 66 | define Package/webtunnel-client/install 67 | $(INSTALL_DIR) $(1)/opt/sbin 68 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/client $(1)/opt/sbin/webtunnel-client 69 | endef 70 | 71 | Package/webtunnel-client_nohf/install=$(Package/webtunnel-client/install) 72 | 73 | define Package/webtunnel-server/install 74 | $(INSTALL_DIR) $(1)/opt/sbin 75 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/server $(1)/opt/sbin/webtunnel-server 76 | endef 77 | 78 | Package/webtunnel-server_nohf/install=$(Package/webtunnel-server/install) 79 | 80 | $(eval $(call BuildPackage,webtunnel-client)) 81 | $(eval $(call BuildPackage,webtunnel-client_nohf)) 82 | $(eval $(call BuildPackage,webtunnel-server)) 83 | $(eval $(call BuildPackage,webtunnel-server_nohf)) 84 | -------------------------------------------------------------------------------- /wireguard-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2011-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=wireguard-go 8 | PKG_VERSION:=v0.0.20230223 9 | PKG_RELEASE:=2 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=e24fc776e0ffb6e3c293895163d95bdd8a3c386f 13 | PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-go 14 | PKG_MIRROR_HASH:=17b1067858180a986596bd0853b97f52e98c3591ba9b0ce684a6490f9e2508a8 15 | 16 | PKG_BUILD_PARALLEL:=1 17 | 18 | include $(INCLUDE_DIR)/package.mk 19 | include $(INCLUDE_DIR)/golang.mk 20 | 21 | define Package/wireguard-go/Default 22 | SECTION:=net 23 | CATEGORY:=Network 24 | SUBMENU:=VPN 25 | TITLE:=This is an implementation of WireGuard in Go 26 | URL:=https://git.zx2c4.com/wireguard-go/about/ 27 | MAINTAINER:=Entware team, https://entware.net 28 | DEPENDS:=+wireguard-tools +wg-quick 29 | endef 30 | 31 | define Package/wireguard-go 32 | $(call Package/wireguard-go/Default) 33 | VARIANT:=hf 34 | endef 35 | 36 | define Package/wireguard-go_nohf 37 | $(call Package/wireguard-go/Default) 38 | VARIANT:=nohf 39 | DEPENDS+=@arm 40 | endef 41 | 42 | define Package/wireguard-go/description 43 | This is an implementation of WireGuard in Go. 44 | endef 45 | 46 | Package/wireguard-go_nohf/description=$(Package/wireguard-go/description) 47 | 48 | define Build/Compile 49 | ( cd $(PKG_BUILD_DIR); \ 50 | $(GO_BIN_GET) -u golang.org/x/net \ 51 | golang.zx2c4.com/wireguard/conn \ 52 | golang.zx2c4.com/wireguard/device; \ 53 | ) 54 | $(call Build/Compile/Go) 55 | endef 56 | 57 | define Package/wireguard-go/install 58 | $(INSTALL_DIR) $(1)/opt/bin 59 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/wireguard $(1)/opt/bin/wireguard-go 60 | endef 61 | 62 | Package/wireguard-go_nohf/install=$(Package/wireguard-go/install) 63 | 64 | $(eval $(call BuildPackage,wireguard-go)) 65 | $(eval $(call BuildPackage,wireguard-go_nohf)) 66 | -------------------------------------------------------------------------------- /wireguard-go/patches/010-entware-ram.patch: -------------------------------------------------------------------------------- 1 | --- a/device/queueconstants_default.go 2 | +++ b/device/queueconstants_default.go 3 | @@ -12,6 +12,6 @@ const ( 4 | QueueOutboundSize = 1024 5 | QueueInboundSize = 1024 6 | QueueHandshakeSize = 1024 7 | - MaxSegmentSize = (1 << 16) - 1 // largest possible UDP datagram 8 | - PreallocatedBuffersPerPool = 0 // Disable and allow for infinite memory growth 9 | + MaxSegmentSize = 1700 // largest possible UDP datagram 10 | + PreallocatedBuffersPerPool = 1024 // Disable and allow for infinite memory growth 11 | ) 12 | -------------------------------------------------------------------------------- /wireguard-ui/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=wireguard-ui 8 | PKG_VERSION:=0.6.2 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_DATE:=2024-01-07 13 | PKG_SOURCE_VERSION:=99104e429557a4cd6bda4b0c2550a656cdfe9bb7 14 | PKG_SOURCE_URL:=https://github.com/ngoduykhanh/wireguard-ui 15 | PKG_MIRROR_HASH:=3a319c17c2fd9d58402ea198379bfe9883c1611ab93a03b0bf1d73118cf2a084 16 | 17 | PKG_LICENSE:=MIT 18 | PKG_LICENSE_FILES:=LICENSE 19 | PKG_MAINTAINER:=Entware team, https://entware.net 20 | 21 | PKG_BUILD_DEPENDS:=node-yarn/host 22 | PKG_BUILD_PARALLEL:=1 23 | 24 | include $(INCLUDE_DIR)/package.mk 25 | include $(INCLUDE_DIR)/golang.mk 26 | 27 | define Package/wireguard-ui/Default 28 | SECTION:=net 29 | CATEGORY:=Network 30 | SUBMENU:=VPN 31 | TITLE:=Wireguard web interface 32 | URL:=https://github.com/ngoduykhanh/wireguard-ui 33 | DEPENDS:=+ca-bundle +iptables +jq +wireguard-tools @!LINUX_2_6_36 34 | endef 35 | 36 | define Package/wireguard-ui 37 | $(call Package/wireguard-ui/Default) 38 | VARIANT:=hf 39 | endef 40 | 41 | define Package/wireguard-ui_nohf 42 | $(call Package/wireguard-ui/Default) 43 | VARIANT:=nohf 44 | DEPENDS+=@arm 45 | endef 46 | 47 | define Package/wireguard-ui/description 48 | A web user interface to manage your WireGuard setup. 49 | endef 50 | 51 | Package/wireguard-ui_nohf/description=$(Package/wireguard-ui/description) 52 | 53 | GO_BUILD_ARGS += -a 54 | 55 | GO_LDFLAGS += \ 56 | -X 'main.appVersion=v$(PKG_VERSION)' \ 57 | -X 'main.buildTime=$(PKG_SOURCE_DATE)' \ 58 | -X 'main.gitCommit=$(COMMIT_SHORT)' \ 59 | -X 'main.gitRef=master' 60 | 61 | define Build/Compile 62 | ( cd $(PKG_BUILD_DIR); $(SHELL) ./prepare_assets.sh; ) 63 | $(call Build/Compile/Go) 64 | endef 65 | 66 | define Package/wireguard-ui/install 67 | $(INSTALL_DIR) $(1)/opt/etc/init.d 68 | $(INSTALL_BIN) ./files/S80wireguard-ui $(1)/opt/etc/init.d 69 | $(INSTALL_DIR) $(1)/opt/sbin 70 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/wireguard-ui $(1)/opt/sbin 71 | endef 72 | 73 | Package/wireguard-ui_nohf/install=$(Package/wireguard-ui/install) 74 | 75 | $(eval $(call BuildPackage,wireguard-ui)) 76 | $(eval $(call BuildPackage,wireguard-ui_nohf)) 77 | -------------------------------------------------------------------------------- /wireguard-ui/files/S80wireguard-ui: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=wireguard-ui 5 | ARGS="" 6 | PREARGS="" 7 | DESC="WireGuard UI" 8 | PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /wireguard-ui/patches/010-fix-cross.patch: -------------------------------------------------------------------------------- 1 | --- a/prepare_assets.sh 2 | +++ b/prepare_assets.sh 3 | @@ -5,7 +5,7 @@ DIR=$(dirname "$0") 4 | 5 | # install node modules 6 | YARN=yarn 7 | -[ -x /usr/bin/lsb_release ] && [ -n "`lsb_release -i | grep Debian`" ] && YARN=yarnpkg 8 | +#[ -x /usr/bin/lsb_release ] && [ -n "`lsb_release -i | grep Debian`" ] && YARN=yarnpkg 9 | $YARN install --pure-lockfile --production 10 | 11 | # Copy admin-lte dist 12 | -------------------------------------------------------------------------------- /wireguard-ui/patches/020-fix-etc-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/templates/global_settings.html 2 | +++ b/templates/global_settings.html 3 | @@ -70,7 +70,7 @@ Global Settings 4 |
5 | 6 | 10 |
11 | 12 | --- a/util/config.go 13 | +++ b/util/config.go 14 | @@ -41,7 +41,7 @@ const ( 15 | DefaultPersistentKeepalive = 15 16 | DefaultFirewallMark = "0xca6c" // i.e. 51820 17 | DefaultTable = "auto" 18 | - DefaultConfigFilePath = "/etc/wireguard/wg0.conf" 19 | + DefaultConfigFilePath = "/opt/etc/wireguard/wg0.conf" 20 | UsernameEnvVar = "WGUI_USERNAME" 21 | PasswordEnvVar = "WGUI_PASSWORD" 22 | PasswordFileEnvVar = "WGUI_PASSWORD_FILE" 23 | -------------------------------------------------------------------------------- /wireguard-ui/patches/030-fix-db-paths.patch: -------------------------------------------------------------------------------- 1 | --- a/main.go 2 | +++ b/main.go 3 | @@ -173,7 +173,7 @@ func init() { 4 | } 5 | 6 | func main() { 7 | - db, err := jsondb.New("./db") 8 | + db, err := jsondb.New("/opt/var/lib/wireguard-ui/db") 9 | if err != nil { 10 | panic(err) 11 | } 12 | --- a/util/util.go 13 | +++ b/util/util.go 14 | @@ -264,7 +264,7 @@ func GetAllocatedIPs(ignoreClientID stri 15 | allocatedIPs := make([]string, 0) 16 | 17 | // initialize database directory 18 | - dir := "./db" 19 | + dir := "/opt/var/lib/wireguard-ui/db" 20 | db, err := scribble.New(dir, nil) 21 | if err != nil { 22 | return nil, err 23 | -------------------------------------------------------------------------------- /xray-plugin/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2023-2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=xray-plugin 8 | PKG_VERSION:=1.8.24 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/teddysun/xray-plugin 14 | PKG_MIRROR_HASH:=8f3818a5de82e1a3b439c991ae6816f84f1ccabd2f8404bc4cf6fe021a8d1e7a 15 | 16 | PKG_LICENSE:=MIT 17 | PKG_LICENSE_FILES:=LICENSE 18 | PKG_MAINTAINER:=Entware team, https://entware.net 19 | 20 | PKG_BUILD_PARALLEL:=1 21 | 22 | include $(INCLUDE_DIR)/package.mk 23 | include $(INCLUDE_DIR)/golang.mk 24 | 25 | define Package/xray-plugin/Default 26 | SECTION:=net 27 | CATEGORY:=Network 28 | SUBMENU:=Web Servers/Proxies 29 | TITLE:=A SIP003 plugin based on Xray-core 30 | URL:=https://github.com/teddysun/xray-plugin 31 | endef 32 | 33 | define Package/xray-plugin 34 | $(call Package/xray-plugin/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/xray-plugin_nohf 39 | $(call Package/xray-plugin/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/xray-plugin/description 45 | Yet another SIP003 plugin for shadowsocks, based on Xray-core. 46 | endef 47 | 48 | Package/xray-plugin_nohf/description=$(Package/xray-plugin/description) 49 | 50 | GO_LDFLAGS += -X 'main.VERSION=v$(PKG_VERSION)' 51 | 52 | define Package/xray-plugin/install 53 | $(INSTALL_DIR) $(1)/opt/bin 54 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/xray-plugin $(1)/opt/bin 55 | endef 56 | 57 | Package/xray-plugin_nohf/install=$(Package/xray-plugin/install) 58 | 59 | $(eval $(call BuildPackage,xray-plugin)) 60 | $(eval $(call BuildPackage,xray-plugin_nohf)) 61 | -------------------------------------------------------------------------------- /xray/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2021-2025 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=xray 8 | PKG_VERSION:=25.5.16 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=800b8b50cc01e7c8904e6f58a682db0e9b4f795c 13 | PKG_SOURCE_URL:=https://github.com/XTLS/Xray-core 14 | PKG_MIRROR_HASH:=4f703ed1786940ca55c9f9e0119325c37798fb7a615abc96d5733fea2ede8a1d 15 | 16 | PKG_LICENSE:=MPL-2.0 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/xray/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=Web Servers/Proxies 28 | TITLE:=a personal vpn server 29 | URL:=https://github.com/XTLS/Xray-core 30 | MAINTAINER:=Entware team, https://entware.net 31 | DEPENDS:=+ca-bundle 32 | endef 33 | 34 | define Package/xray-core 35 | $(call Package/xray/Default) 36 | VARIANT:=hf 37 | endef 38 | 39 | define Package/xray-core_nohf 40 | $(call Package/xray/Default) 41 | VARIANT:=nohf 42 | DEPENDS+=@arm 43 | endef 44 | 45 | define Package/xray 46 | $(call Package/xray/Default) 47 | TITLE+= (scripts & configs) 48 | VARIANT:=hf 49 | DEPENDS:=+xray-core 50 | endef 51 | 52 | define Package/xray_nohf 53 | $(call Package/xray/Default) 54 | TITLE+= (scripts & configs) 55 | VARIANT:=nohf 56 | DEPENDS:=+xray-core_nohf 57 | endef 58 | 59 | define Package/xray-core/description 60 | Project X originates from XTLS protocol, providing a set of network tools. 61 | endef 62 | 63 | Package/xray-core_nohf/description=$(Package/xray-core/description) 64 | 65 | define Package/xray/description 66 | scripts & configs. 67 | endef 68 | 69 | Package/xray_nohf/description=$(Package/xray/description) 70 | 71 | define Package/xray/conffiles 72 | /opt/etc/xray/config.json 73 | endef 74 | 75 | Package/xray_nohf/conffiles=$(Package/xray/conffiles) 76 | 77 | XIMPORTPATH:=$(call tolower,$(XIMPORTPATH)) 78 | 79 | GO_LDFLAGS += \ 80 | -X '$(XIMPORTPATH)/core.build=$(COMMIT_SHORT)' 81 | 82 | GO_TARGET:=./main 83 | 84 | define Package/xray-core/install 85 | $(INSTALL_DIR) $(1)/opt/sbin 86 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/main $(1)/opt/sbin/xray 87 | endef 88 | 89 | Package/xray-core_nohf/install=$(Package/xray-core/install) 90 | 91 | define Package/xray/install 92 | $(INSTALL_DIR) $(1)/opt/etc/init.d 93 | $(INSTALL_BIN) ./files/S24xray $(1)/opt/etc/init.d 94 | $(INSTALL_DIR) $(1)/opt/etc/xray 95 | $(INSTALL_CONF) ./files/config.json.example $(1)/opt/etc/xray 96 | endef 97 | 98 | Package/xray_nohf/install=$(Package/xray/install) 99 | 100 | $(eval $(call BuildPackage,xray-core)) 101 | $(eval $(call BuildPackage,xray-core_nohf)) 102 | $(eval $(call BuildPackage,xray)) 103 | $(eval $(call BuildPackage,xray_nohf)) 104 | -------------------------------------------------------------------------------- /xray/files/S24xray: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ENABLED=yes 4 | PROCS=xray 5 | ARGS="run -confdir /opt/etc/xray" 6 | PREARGS="" 7 | DESC=$PROCS 8 | PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 | 10 | . /opt/etc/init.d/rc.func 11 | -------------------------------------------------------------------------------- /xray/files/config.json.example: -------------------------------------------------------------------------------- 1 | // Config file of Xray. This file follows standard JSON format, with comments support. 2 | // Uncomment entries below to satisfy your needs. Also read our manual for more detail at 3 | // https://xtls.github.io/en/config/ 4 | { 5 | "log": { 6 | // By default, Xray writes access log to stdout. 7 | // "access": "/path/to/access/log/file", 8 | 9 | // By default, Xray write error log to stdout. 10 | // "error": "/path/to/error/log/file", 11 | 12 | // Log level, one of "debug", "info", "warning", "error", "none" 13 | "loglevel": "warning" 14 | }, 15 | // List of inbound proxy configurations. 16 | "inbounds": [{ 17 | // Port to listen on. You may need root access if the value is less than 1024. 18 | "port": 1080, 19 | 20 | // IP address to listen on. Change to "0.0.0.0" to listen on all network interfaces. 21 | "listen": "127.0.0.1", 22 | 23 | // Tag of the inbound proxy. May be used for routing. 24 | "tag": "socks-inbound", 25 | 26 | // Protocol name of inbound proxy. 27 | "protocol": "socks", 28 | 29 | // Settings of the protocol. Varies based on protocol. 30 | "settings": { 31 | "auth": "noauth", 32 | "udp": false, 33 | "ip": "127.0.0.1" 34 | }, 35 | 36 | // Enable sniffing on TCP connection. 37 | "sniffing": { 38 | "enabled": true, 39 | // Target domain will be overriden to the one carried by the connection, if the connection is HTTP or HTTPS. 40 | "destOverride": ["http", "tls"] 41 | } 42 | }], 43 | // List of outbound proxy configurations. 44 | "outbounds": [{ 45 | // Protocol name of the outbound proxy. 46 | "protocol": "freedom", 47 | 48 | // Settings of the protocol. Varies based on protocol. 49 | "settings": {}, 50 | 51 | // Tag of the outbound. May be used for routing. 52 | "tag": "direct" 53 | },{ 54 | "protocol": "blackhole", 55 | "settings": {}, 56 | "tag": "blocked" 57 | }], 58 | 59 | // Transport is for global transport settings. If you have multiple transports with same settings 60 | // (say mKCP), you may put it here, instead of in each individual inbound/outbounds. 61 | //"transport": {}, 62 | 63 | // Routing controls how traffic from inbounds are sent to outbounds. 64 | "routing": { 65 | "domainStrategy": "IPOnDemand", 66 | "rules":[ 67 | { 68 | // Blocks access to private IPs. Remove this if you want to access your router. 69 | "type": "field", 70 | "ip": ["geoip:private"], 71 | "outboundTag": "blocked" 72 | }, 73 | { 74 | // Blocks major ads. 75 | "type": "field", 76 | "domain": ["geosite:category-ads"], 77 | "outboundTag": "blocked" 78 | } 79 | ] 80 | }, 81 | 82 | // Dns settings for domain resolution. 83 | "dns": { 84 | // Static hosts, similar to hosts file. 85 | "hosts": { 86 | // Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com. 87 | "domain:v2ray.com": "www.vicemc.net", 88 | 89 | // The following settings help to eliminate DNS poisoning in mainland China. 90 | // It is safe to comment these out if this is not the case for you. 91 | "domain:github.io": "pages.github.com", 92 | "domain:wikipedia.org": "www.wikimedia.org", 93 | "domain:shadowsocks.org": "electronicsrealm.com" 94 | }, 95 | "servers": [ 96 | "1.1.1.1", 97 | { 98 | "address": "114.114.114.114", 99 | "port": 53, 100 | // List of domains that use this DNS first. 101 | "domains": [ 102 | "geosite:cn" 103 | ] 104 | }, 105 | "8.8.8.8", 106 | "localhost" 107 | ] 108 | }, 109 | 110 | // Policy controls some internal behavior of how Xray handles connections. 111 | // It may be on connection level by user levels in 'levels', or global settings in 'system.' 112 | "policy": { 113 | // Connection policys by user levels 114 | "levels": { 115 | "0": { 116 | "uplinkOnly": 0, 117 | "downlinkOnly": 0 118 | } 119 | }, 120 | "system": { 121 | "statsInboundUplink": false, 122 | "statsInboundDownlink": false, 123 | "statsOutboundUplink": false, 124 | "statsOutboundDownlink": false 125 | } 126 | }, 127 | 128 | // Stats enables internal stats counter. 129 | // This setting can be used together with Policy and Api. 130 | //"stats":{}, 131 | 132 | // Api enables gRPC APIs for external programs to communicate with Xray instance. 133 | //"api": { 134 | //"tag": "api", 135 | //"services": [ 136 | // "HandlerService", 137 | // "LoggerService", 138 | // "StatsService" 139 | //] 140 | //}, 141 | 142 | // You may add other entries to the configuration, but they will not be recognized by Xray. 143 | "other": {} 144 | } 145 | -------------------------------------------------------------------------------- /yggdrasil-go/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: GPL-2.0-only 2 | # 3 | # Copyright (C) 2020-2024 Entware 4 | 5 | include $(TOPDIR)/rules.mk 6 | 7 | PKG_NAME:=yggdrasil-go 8 | PKG_VERSION:=0.5.12 9 | PKG_RELEASE:=1 10 | 11 | PKG_SOURCE_PROTO:=git 12 | PKG_SOURCE_VERSION:=v$(PKG_VERSION) 13 | PKG_SOURCE_URL:=https://github.com/yggdrasil-network/yggdrasil-go 14 | PKG_MIRROR_HASH:=52653522b1f5a0d1187908c9c76574f095ad1a7e889e4641dd85129b37daeea2 15 | 16 | PKG_LICENSE:=LGPL-3.0-only 17 | PKG_LICENSE_FILES:=LICENSE 18 | 19 | PKG_BUILD_PARALLEL:=1 20 | 21 | include $(INCLUDE_DIR)/package.mk 22 | include $(INCLUDE_DIR)/golang.mk 23 | 24 | define Package/yggdrasil-go/Default 25 | SECTION:=net 26 | CATEGORY:=Network 27 | SUBMENU:=Routing and Redirection 28 | TITLE:=Encrypted IPv6 network 29 | URL:=https://yggdrasil-network.github.io/ 30 | MAINTAINER:=Entware team, https://entware.net 31 | endef 32 | 33 | define Package/yggdrasil-go 34 | $(call Package/yggdrasil-go/Default) 35 | VARIANT:=hf 36 | endef 37 | 38 | define Package/yggdrasil-go_nohf 39 | $(call Package/yggdrasil-go/Default) 40 | VARIANT:=nohf 41 | DEPENDS:=@arm 42 | endef 43 | 44 | define Package/yggdrasil-go/description 45 | Yggdrasil builds end-to-end encrypted networks with IPv6. 46 | Beyond the similarities with cjdns is a different routing algorithm. 47 | This globally-agreed spanning tree uses greedy routing in a metric space. 48 | Back-pressure routing techniques allow advanced link aggregation bonding 49 | on per-stream basis. In turn, a single stream will span across multiple 50 | network interfaces simultaneously with much greater throughput. 51 | endef 52 | 53 | Package/yggdrasil-go_nohf/description=$(Package/yggdrasil-go/description) 54 | 55 | GO_LDFLAGS += \ 56 | -X '$(XIMPORTPATH)/src/version.buildName=yggdrasil-entware' \ 57 | -X '$(XIMPORTPATH)/src/version.buildVersion=$(PKG_VERSION)' 58 | 59 | GO_TARGET:=./cmd/yggdrasil ./cmd/yggdrasilctl 60 | 61 | define Package/yggdrasil-go/install 62 | $(INSTALL_DIR) $(1)/opt/sbin 63 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/yggdrasil{,ctl} $(1)/opt/sbin 64 | endef 65 | 66 | Package/yggdrasil-go_nohf/install=$(Package/yggdrasil-go/install) 67 | 68 | $(eval $(call BuildPackage,yggdrasil-go)) 69 | $(eval $(call BuildPackage,yggdrasil-go_nohf)) 70 | --------------------------------------------------------------------------------