Ran: 用 Go 写的静态 web 服务器

2015-10-02 00:52:59 +08:00
 m3ng9i
地址:<https://github.com/m3ng9i/ran>

托 Go 的福,比 python 的那个一句话服务器 (python3 -m http.server) 速度快多了。

功能:
- 可以列出目录下的文件
- gzip 压缩
- 支持 digest 身份认证
- 自定义 404 文件
3915 次点击
所在节点    分享创造
14 条回复
hiroya
2015-10-02 07:54:12 +08:00
已 star ,比较期待下个版本的 TLS 功能
XhstormR
2015-10-02 08:30:26 +08:00
已 star ,主要拿来在局域网中传文件,用 -l=true
strwei
2015-10-02 12:14:01 +08:00
已 star
m3ng9i
2015-10-02 16:16:47 +08:00
@XhstormR @strwei 多谢

@hiroya 多谢,那我以后优先做 TLS
Reficul
2015-10-02 18:29:05 +08:00
在学习 Go , star 学习下
noli
2015-10-03 18:36:01 +08:00
来拆个台,写一个用上 gevent 的 http 服务器速度马上就上去了吧?
m3ng9i
2015-10-03 23:48:32 +08:00
@noli gevent 这个我不懂。不过有人说输入 ran 这几个字母比 python3 -m http.server 快,哈哈
zrmlx
2015-10-04 06:04:21 +08:00
@m3ng9i 求加个反向代理+缓存功能,这样就能愉快的跑在小米路由器上缓存 maven 仓库了😂, go 编译的可以直接丢在路由器上跑, nginx 交叉编译脑袋都炸了
m3ng9i
2015-10-04 11:00:57 +08:00
@zrmlx

你试试 https://caddyserver.com/

页面里有提到:
Reverse Proxy
Forward requests to other endpoints with reverse proxy and load balancing.
Reficul
2015-10-04 17:25:52 +08:00
@zrmlx

现在 mips 架构现在有 go 编译器了?
zrmlx
2015-10-04 20:28:35 +08:00
@Reficul 博通的 U 能直接跑二进制.........
zrmlx
2015-10-04 20:29:42 +08:00
@m3ng9i Thanks,之前一直找没找到,终于可以愉快的跑在路由器上了
fuxiaohei
2015-10-06 23:34:53 +08:00
类似的想起了这个

https://caddyserver.com/
m3ng9i
2015-10-06 23:54:50 +08:00
@fuxiaohei 我快写完 Ran 时才发现还有一个 caddy ,不过以后我可能会加一些 caddy 里没有的功能

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/225151

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX