自建服务最后一百米
宿舍小主机一直在使用cloudflared进行内网穿透,将服务挂在公网上,但是cloudflared服务在国内的速度属实拉垮。前几天突然想到早期的idc主机分销,看见了香港节点,号称三网全部30ms延迟,这拿来做反向代理,速度不是狠狠得快? ...
宿舍小主机一直在使用cloudflared进行内网穿透,将服务挂在公网上,但是cloudflared服务在国内的速度属实拉垮。前几天突然想到早期的idc主机分销,看见了香港节点,号称三网全部30ms延迟,这拿来做反向代理,速度不是狠狠得快? ...
源码自:https://github.com/padavanonly/immortalwrt/tree/q20-pbboot 生成.config 创建目录并开启大小写敏感,否则会报错Build dependency: OpenWrt can only be built on a case-sensitive filesystem 1 fsutil.exe file setCaseSensitiveInfo <path> enable 后面发现可以是GitHub云编译生成config,但是这样配置需要等待GitHub建立环境,再用ssh连接,需要等,而且需要添加其他组件的时候,需要重新等它重新配置好环境,感觉刚尝试的时候还是本地编译比较好。 ...
如果没有搭建博客,请按照Hexo博客的教程搭建一个博客,本地搭建好后再进行更改即可集成FlowUs作为写作平台。 说明 本教程需要两个仓库,一个用于存放Hexo,一个用于存放生成的静态文件。 ...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 def action(route, name=""): def inner_warpper(func): from django.urls import get_resolver resolver = get_resolver() if isclass(func) and issubclass(func, View): resolver.url_patterns.append(path(f"{route}/", func.as_view(), name=name if name else None)) else: resolver.url_patterns.append(path(f"{route}/", func, name=name if name else None)) @wraps(func) def wrapper(request, *args, **kwargs): return func(request, *args, **kwargs) return wrapper return inner_warpper 使用方法: 1 2 3 4 5 6 7 8 @action("classview") class TestView(View): def get(self, request): return JsonResponse({"message": "Hello, world!"}) @action("hello",name="hello") def hello(request): return JsonResponse({"message": "Hello, world!"})
昨天折腾了一下用Docker部署Django+redis+MySQL的项目,顺便压缩了一下之前不使用数据库的Django的项目的镜像大小。 配置文件 推荐使用alang/django,一个是因为官方几年前就停止更新了,另一个是如果通过python的镜像进行构建,构建出来的镜像会比较大,大概1G多,而由于这个镜像是基于alpine构建的,大概在300M左右(用python的alpine构建也可以,但如果需要用gunicorn启动的话得自己配置,比较麻烦。) ...
Cloudflare Tunnel provides you with a secure way to connect your resources to Cloudflare without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP — instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare’s global network. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare. ...
八月份将N3540转手给学弟了,自己入手了一个J4152,而且之前写的有点太水了,前来更新一下文章。 设备 WRT1200AC(主路由)【社团的路由器,换其他也行,主要是用来做无线接入】 ...
安装宝塔面板 宝塔官网:宝塔面板 - 简单好用的Linux/Windows服务器运维管理面板 (bt.cn) 在官网点击立即免费安装,之后在命令行输入对应的系统的命令进行安装就行。 Ubuntu: ...