Install Wireguard on Ubuntu

Downoad Wireguard sudo add-apt-repository ppa:wireguard/wireguard $ sudo apt-get update $ sudo apt-get install wireguard ... wireguard: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/4.4.0-1099-aws/updates/dkms/ depmod.... DKMS: install completed. Setting up wireguard-tools (0.0.20191219-wg1~xenial) ... Setting up wireguard (0.0.20191219-wg1~xenial) ... Generate private, public key $ umask 077 $ wg genkey | tee privatekey | wg pubkey > publickey Add config config content

Telnet Linode Tcp Port Connection Refused

在 linode vps 上开启了 postgres 5432 端口 lsof -i :5432 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME postmaste 24734 postgres 3u IPv4 53994 0t0 TCP *:postgres (LISTEN) postmaste 24734 postgres 4u IPv6 53995 0t0 TCP *:postgres (LISTEN) 但是通过本地无法连接,报 Connection refused telnet x.x.x.x 5432 Trying x.x.x.x... telnet: connect to address x.x.x.x: Connection refused telnet:

Learning Nsq Part 2 Architecture

NSQ Architecture NSQ 主要由3个守护进程组成。 NSQD 主要负责接受,入队,递送消息给 client. NSQLOOKUPD 用来管理拓扑信息并提供最终一致的发现服务. NSQADMIN 是一个实时内省集群的Web UI Topic,

Learning Nsq Part 1

What is NSQ NSQ A realtime distributed messaging platform NSQ 是一个实时的分布式消息平台。 Features 支持没有单点失败的分布式架构 横向扩展 低延迟的基于 push 的消息递送机制 组合 负载平衡 和 多播 方式的消

Golang Echo Part 2

Basic Concept of Echo Context Context represents the context of the current HTTP request. It holds request and response objects, path, path parameters, data and registered handler. Route Route is used to handle the request of a specific request. contains a handler and information for matching against requests. e.GET("/", helloHandler) // registers a new GET route for a path with matching handler in the router Handler Func defines a function to serve HTTP requests.