-
enable NDP proxy at ocserv server host:
sysctl -w net.ipv6.conf.all.proxy_ndp=1
. -
assign a sub network of ocserv server host IPv6 network for clients, for example:
if the IPv6 address of ocserv server host inteface eth0 is 2608:8207:7888:a450::1/64, then add the fellowing lines into ocserv.conf:
ipv6-network = 2608:8207:7888:a450:cafe::/80
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
ca-bundle.crt: mk-ca-bundle.pl | |
perl mk-ca-bundle.pl -f -u -q | |
mk-ca-bundle.pl: | |
curl -LOs https://github.com/curl/curl/raw/master/lib/mk-ca-bundle.pl |
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
FROM centos:7 | |
ENV container docker | |
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | |
rm -f /lib/systemd/system/multi-user.target.wants/*; \ | |
rm -f /etc/systemd/system/*.wants/*; \ | |
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | |
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | |
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ |
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
#!/bin/bash | |
LUAVER=5.4.0 | |
LIBSLZVER=ff537154e7f5f2fffdbef1cd8c52b564c1b00067 | |
PCRE2VER=10.35 | |
OPENSSLVER=1.1.1g | |
HAPROXYVER=2.2.2 | |
PREFIX=/tmp/opt | |
CURDIR=${PWD} |
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
transport := &http.Transport{ | |
Proxy: http.ProxyFromEnvironment, | |
DialContext: (&net.Dialer{ | |
Timeout: 5 * time.Second, | |
KeepAlive: 30 * time.Second, | |
}).DialContext, | |
TLSHandshakeTimeout: 5 * time.Second, | |
ExpectContinueTimeout: 5 * time.Second, | |
ResponseHeaderTimeout: 7 * time.Second, | |
IdleConnTimeout: 5 * time.Second, |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
import ipaddress | |
import re | |
HEAD = re.compile('^(\|\|?)?(https?://)?') | |
TAIL = re.compile('(/.*$)|(%2f.*$)|(%2F.*$)') |
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
authorityKeyIdentifier=keyid,issuer | |
basicConstraints=CA:FALSE | |
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment | |
extendedKeyUsage = serverAuth,clientAuth | |
subjectAltName = @altnames | |
[altnames] | |
DNS.1 = localhost | |
DNS.2 = 127.0.0.1 | |
DNS.3 = ::1 |
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
mvfunc() { | |
local original="$(declare -f $1)" | |
local newname="$2${original#$1}" | |
eval "${newname}" | |
} |
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 ( | |
"fmt" | |
"math" | |
"runtime" | |
"time" | |
) | |
// Using the Bailey–Borwein–Plouffe formula |
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 ( | |
"bytes" | |
"image" | |
"image/png" | |
"io" | |
"github.com/srwiley/oksvg" | |
"github.com/srwiley/rasterx" |