2020年3月

最近在学习 nginx 的反向代理,在处理请求和响应的时候,需要处理 header 头信息用到了很多 nignx 变量,但是在传递给代理服务器时,我不知道我设置的 proxy_set_header 等信息是否设置正确,以及其他用到的变量到底当前值是多少我也不知道。调试起来很费劲。

发现一个第三方 nginx 模块:echo,可以方便的输出信息,利用这一模块可以实现变量值读取到 html,调试方便了很多。

echo GitHub 主页:https://github.com/openresty/echo-nginx-module

阅读全文


Proxying is typically used to distribute the load among several servers, seamlessly show content from different websites, or pass requests for processing to application servers over protocols other than HTTP.

nginx 可以将一个客户端的请求反向代理到其他地址/端口,从客户端上看不到代理过程。方向代理的常用来处理服务器上部署的多个网络服务,根据请求呈现不同网页内容,转发请求到其他应用程序等。支持转发的协议有: HTTP,FastCGI, uwsgi, SCGI, and memcached。

不同于 nginx 的重定向 return/rewrite/try_fiels 功能,反向代理对于客户端是不可见的,关于重定向的语法参考:https://blog.niekun.net/archives/195.html

下面介绍 ngx_http_proxy_module 模块的使用方式。

阅读全文


2020-03-29T13:28:27.png
一幅图像能否吸引眼球,最简单的方式就是将主体突出,比如人物的眼睛。所以,在修图中最后一步往往是锐化图像。

锐化的原理就是将像素颜色反差的地方加强反差,而不破坏颜色相似地方的自然过渡。

下面介绍三种不同的方式进行图像锐化。使用的工具主要有以下:

  • smart sharpen,blend mode:darken and lighten
  • gaussian blur,apply image:subtract
  • high pass,contract

阅读全文


2020-03-27T01:40:28.png
众所周知,现在百度盘非会员下载速度十分慢,还要求必须使用他的客户端下载,我的资料现在也基本不会存在百度云了。但是在下载已经保存在上面的资源或者网络别人分享的资源,还是偶尔要用到,而我又对百度十分的讨厌,也不会去充值会员,所以研究了下如何解决非会员的限速问题。

阅读全文


The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems.[1] HTTP is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser.

以上说明摘录自 Wikipedia,HTTP 全称为超文本传输协议,设计HTTP最初的目的是为了提供一种发布和接收HTML页面的方法。通过HTTP或者HTTPS协议请求的资源由统一资源标识符(Uniform Resource Identifiers,URI)来标识。

阅读全文