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
# Connection parameters | |
# ===================== | |
# Connection parameters general | |
keyexchange=ike # IKE version to use. Default to ike (IKE version 1). Use ikev2 for IKEv2 | |
connaddrfamily=ipv4 # The default value | |
type=tunnel # Type of the connection. Possible values are | |
# tunnel - host-to-host, host-to-subnet, subnet-to-subnet tunnel | |
# transport - host-to-host transport mode | |
# passthrough - no IPSec processing should be done | |
# drop - Packets should be discared |
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
config main | |
interfaces=%default | |
nat-ikeport=4500 # Port to use for NAT-T. This is the default value | |
ikeport=500 # Port to use for IKE. This is the default value | |
# listen=<ip address> # The IP address on of the host to be used by IPSec | |
conn <conn-name> # Name of this connection | |
auto=start # Start this connection on IPSec startup | |
authby=secret # Use PSK to authenticate peers | |
type=tunnel |
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
global | |
maxconn 25000 | |
log /dev/log local0 info | |
# debug | |
# silent | |
user haproxy | |
group haproxy | |
daemon | |
defaults |
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
# Common fetches | |
# Match source IP address | |
acl is_malicious src 192.168.10.32 | |
acl is_local_net src 192.168.32.0/24 # match IP range | |
# Match request path | |
acl is_api path -i -m beg /api # match paths starting with /api | |
acl is_image -i -m end .jpg .png .gif # match paths ending with .jpg .png and .gif extensions | |
acl is_health -i path_str /health # exact match path /health |
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
const introduce = function() { | |
console.log("Hi! I'm " + this.name + ". My job is " + this.job + "."); | |
} | |
function makeRobot(name, job) { | |
return { | |
name: name, | |
job: job, | |
introduce, |
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
function Robot(name, job) { | |
this.name = name; | |
this.job = job; | |
} | |
Robot.prototype.introduce = function() { | |
console.log("Hi! I'm " + this.name + ". My job is " + this.job + "."); | |
}; | |
var bender = new Robot("Bender", "bending"); |