1:设置
sudo vi /etc/sysctl.conf
net.ipv4.ip_forward=1
sudo sysctl -p
2:安装
https://www.wireguard.com/install/
alert(1) |
#!/bin/bash | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | |
done | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
echo $DIR |
1:设置
sudo vi /etc/sysctl.conf
net.ipv4.ip_forward=1
sudo sysctl -p
2:安装
https://www.wireguard.com/install/
# Generating throwaway QR codes from the command line for shunting URLS to mobile devices | |
brew install qrencode | |
qrencode -o - http://www.google.com | open -f -a preview |
package main | |
import ( | |
"bytes" | |
"crypto/hmac" | |
"crypto/rand" | |
"encoding/base64" | |
"encoding/binary" | |
"encoding/hex" | |
"fmt" |
#!/bin/sh | |
# create self-signed server certificate: | |
read -p "Enter your domain [www.example.com]: " DOMAIN | |
echo "Create server key..." | |
openssl genrsa -aes256 -out $DOMAIN.key 4096 | |
echo "Create server certificate signing request..." |
#!/bin/bash | |
########################################################## | |
# Fix Symlinks | |
# | |
# Usage : Copy this file into the Framework directory, | |
# Execute it passing the Framework Name in argument. | |
# | |
########################################################## | |
if [ -z $1 ] ; then |
#include <event2/bufferevent.h> | |
#include <event2/buffer.h> | |
#include <event2/event.h> | |
#include <event2/dns.h> | |
#include <arpa/inet.h> | |
#include <iostream> | |
using namespace std; |
#define NSNullObjects @[@"",@0,@{},@[]] | |
@interface NSNull (InternalNullExtention) | |
@end | |
@implementation NSNull (InternalNullExtention) | |
cipher:AEAD_AES_128_GCM password: 123456
[]byte{138,63,217,116,14,116,56,73,33,70,156,41,233,72,190,145,113,182,5,56,182,149,118,220,138,110,150,113,18,121,249,240,247,26,253,240,88,195,246,238,204,245,60,59,17,128,30,105,58,187,22,149,215,243,167,124,58,190,8,54,19,154,74,74,52,124,246,81,7,43,167,86,29,108,147,180,159,196,6,159,141,88,17,214,71,238,136,19,87,130,129,92,198,139,12,200,121,42,50,232,31,163,129,157,15,160,160,169,182,128,12,86,150,103,202,159,5,115,38,0,231,215,32,90,205,68,255,161,172,82,108,232,202,237,3,30,64,107,136,209,50}