-
服务发现:所有可用的上游/后端服务实例是什么?
-
运行状况检查:服务发现返回的上游服务实例是否健康并准备接受网络流量?这可以包括主动(例如,对/healthcheck端点的带外ping )和被动(例如,使用3个连续的5xx作为不健康状态的指示)健康检查。
-
路由:给定/foo来自本地服务实例的REST请求,该请求应发送到哪个上游服务集群?
-
负载平衡:在路由过程中选择了上游服务集群后,应将请求发送到哪个上游服务实例?几点超时?用什么断路设置?如果请求失败,应该重试吗?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"bytes" | |
"crypto/hmac" | |
"crypto/sha256" | |
"encoding/base64" | |
"io/ioutil" | |
"net/http" | |
"strings" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"theme": "elegant" | |
}, | |
"basics": { | |
"name": "Chris Swanda", | |
"label": "DevOps Engineer at SelectQuote Insurance Services", | |
"picture": "", | |
"email": "[email protected]", | |
"summary": "A consummate, battle-tested technical professional with over 20 years of industry experience, ranging across multiple diverse disciplines - from the laboratory, to the board room. I have the innate ability discover and realize new opportunities for revenue, cost reduction and invention for internal and external stakeholders; by using uncommon knowledge, to bring forth uncommon results.", |
- https://research.kudelskisecurity.com/2017/06/07/installing-wireguard-the-modern-vpn/
- https://gist.github.com/nealfennimore/92d571db63404e7ddfba660646ceaf0d
- https://angristan.xyz/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
- https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
NB;
- the private IP address
192.168.3.XX
doesn't have to be an IP you own.
create a new vps/ip on ua cloud provider and check IP location on https://www.whatismyip.com/ip-address-lookup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Designing Data-Intensive Applications | |
Streaming System | |
least expressiveness principle | |
Multi-Paradigm Programming | |
Domain Driven Design |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note that this is not the production code | |
pragma solidity 0.5.6; | |
import "./IERC20.sol"; | |
contract Wallet { | |
address internal token = 0x123...<hot_wallet_addr>; | |
address internal hotWallet = 0x321...<hot_wallet_addr>; | |
constructor() public { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"log" | |
"github.com/btcsuite/btcd/chaincfg" | |
"github.com/btcsuite/btcutil" | |
"github.com/btcsuite/btcutil/hdkeychain" |
Dockerized: V2ray + WebSocket + TLS + Web
also see: https://toutyrater.github.io/advanced/wss_and_web.html
Server side sontents:
- Caddyfile
- config.json
- docker-compose.yml
Client side contents:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <arpa/inet.h> | |
#include <string.h> | |
#include "trans_packet.h" | |
void on_packet_recv(char* from_ip, uint16_t from_port, char* payload, int size, unsigned int seq) { | |
printf("Packet received from=%s:%d, seq=%d\n", from_ip, from_port, seq); | |
char* message = (char*)malloc(size); | |
memcpy(message, payload, size); |
NewerOlder