[GH-ISSUE #3739] [Feature Request] reduce the binary size for the embedded devices #2973

Closed
opened 2026-05-05 13:55:09 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @ty359 on GitHub (Oct 31, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3739

Describe the feature request

openwrt上别的软件就几kb,frps/frpc 加起来10M,是不是可以考虑想办法缩减一下。

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @ty359 on GitHub (Oct 31, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3739 ### Describe the feature request openwrt上别的软件就几kb,frps/frpc 加起来10M,是不是可以考虑想办法缩减一下。 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [x] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:55:09 -06:00
Author
Owner

@superzjg commented on GitHub (Nov 1, 2023):

说 frps/frpc 加起来10M也不对,你装的ipk应该是制作者把binary用upx压缩过的(运行时在ram解压),原版arm64的frpc大于12M,frps约15M。
那种几kb的软件一般是 C 语言编写的,动态编译,链接了系统很多库文件(依赖)。
其实 go 语言编写的程序体积都比较大的,比如 alist 将近50M,跟默认 静态编译 关系很大,但也有好处,就是基本不需要安装什么依赖单个文件即可运行。
在openwrt运行这些软件,最好还是带有usb口的路由器,可扩展存储空间,没有usb那就用upx压缩,多占用点ram使用。

<!-- gh-comment-id:1788246949 --> @superzjg commented on GitHub (Nov 1, 2023): 说 frps/frpc 加起来10M也不对,你装的ipk应该是制作者把binary用upx压缩过的(运行时在ram解压),原版arm64的frpc大于12M,frps约15M。 那种几kb的软件一般是 C 语言编写的,动态编译,链接了系统很多库文件(依赖)。 其实 go 语言编写的程序体积都比较大的,比如 alist 将近50M,跟默认 静态编译 关系很大,但也有好处,就是基本不需要安装什么依赖单个文件即可运行。 在openwrt运行这些软件,最好还是带有usb口的路由器,可扩展存储空间,没有usb那就用upx压缩,多占用点ram使用。
Author
Owner

@fatedier commented on GitHub (Nov 1, 2023):

考虑硬件成本越来越低,嵌入式设备的性能和内存/存储也越来越强,在这方面的投入似乎价值不是很大。

像上面说的,你也可以尝试针对你的系统看能不能用动态链接库的方式编译。

<!-- gh-comment-id:1788319196 --> @fatedier commented on GitHub (Nov 1, 2023): 考虑硬件成本越来越低,嵌入式设备的性能和内存/存储也越来越强,在这方面的投入似乎价值不是很大。 像上面说的,你也可以尝试针对你的系统看能不能用动态链接库的方式编译。
Author
Owner

@github-actions[bot] commented on GitHub (Dec 2, 2023):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:1836958925 --> @github-actions[bot] commented on GitHub (Dec 2, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2973
No description provided.