Skip to content

Instantly share code, notes, and snippets.

(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@guorenxi
guorenxi / a-v2ray-wss-cdn-without-proxy.md
Created February 2, 2022 15:41 — forked from phlinhng/a-v2ray-wss-cdn-without-proxy.md
v2ray wss不开cloudflare proxy套用cdn (让同一个域名既能直连也能通过cdn中转)

动机

在v2ray+ws+tls+web的情况下,不管cloudflare dns有没有开启云朵(proxy),都可以透过address填cf节点ip,ws头部host填域名的方式连接上v2Ray服务器。写这篇的目的是想测试在没有web的情况下使用同一招,让同一个域名既能直连也能通过cdn中转。

有web时的连接方法

地址: cloudflare.com (或1.1.1.1或任何cloudflare节点IP)
端口: web服务器的端口 (通常为443)
tls: 开
不安全连接: 不允许
混淆: websocket
@guorenxi
guorenxi / nginx-config-auth-cert-ssl.md
Created November 1, 2021 15:43 — forked from alexishida/nginx-config-auth-cert-ssl.md
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
U2FsdGVkX1/Kecac5WavAvgBTHX6jMQnpClKCdHDqUE/ly9mhPqmgoHbFIKL2uoZ