Skip to content

Instantly share code, notes, and snippets.

View KidFeng's full-sized avatar

Kid Feng KidFeng

  • ONES
  • Canton, China
  • 21:23 (UTC +08:00)
View GitHub Profile
#!/usr/bin/env python
# Usage:
# This script will generate two files(vpnup and vpndown) after executing.
# Do chmod a+x on the two newly created files, and then move them to the
# openvpn config folder. then add the following two lines to the vpn config file:
# up vpnup
# down vpndown
# you might also need 'redirect-gateway' in the config file, if you don't use vpn
# as the default gateway.
@KidFeng
KidFeng / GFW_to_stop_DDoS
Created December 24, 2010 10:48
How to use GFW to stop DDoS attacks from China
<?php
if(strpos($_SERVER['REQUEST_URI'],'minghui') === false) {
header('Location:'. $_SERVER['REQUEST_URI'] . '?minghui');
exit;
}
?>