Skip to content

Instantly share code, notes, and snippets.

View coconut49's full-sized avatar
🐰
Focusing

49 coconut49

🐰
Focusing
View GitHub Profile

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.3.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@coconut49
coconut49 / racoon-vpn-setup.sh
Last active August 29, 2015 14:25
Racoon IPSEC VPN setup using IKEv1 and Linux Username and Password
#! /bin/sh
# 安装racoon
apt-get install racoon
# 配置racoon
cat << _EOF_ > /etc/racoon/racoon.conf
log notify;
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
listen {
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
username = '' ###账号###
password = '' ###密码###
login_url = 'http://v2ex.com/signin' ###如V2EX设置了使用 SSL,必须改 https###
index_url = 'http://v2ex.com' ###同上###
mission_url = 'http://www.v2ex.com/mission/daily' ###同上###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \