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
#set export password as aircontrolenterprise | |
openssl pkcs12 -export -in unifi.crt -inkey unifi.pem -out unifi.p12 -name unifi -CAfile chain.crt -caname root -chain | |
keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore keystore -srckeystore unifi.p12 -srcstoretype PKCS12 -srcstorepass aircontrolenterprise -alias unifi | |
mv keystore /usr/lib/unifi/data/keystore |
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
body { | |
font-family: HelveticaNeue-thin, Helvetica, arial, sans-serif, PingFangSC-Regular, STXihei, SimHei; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
color: 424242; | |
background-color: #eeeeee; | |
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75); | |
padding: 30px; } |
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 | |
ipsec pki --gen --outform pem > ca.pem | |
ipsec pki --self --in ca.pem --dn "C=DEMO, O=DEMO, CN=DEMO" --ca --outform pem >ca.cert.pem | |
ipsec pki --gen --outform pem > server.pem | |
ipsec pki --pub --in server.pem | ipsec pki --issue --cacert ca.cert.pem --cakey ca.pem --dn "C=DEMO, O=DEMO, CN=domain.name" --san="domain.name" --flag serverAuth --flag ikeIntermediate --outform pem > server.cert.pem | |
ipsec pki --gen --outform pem > client.pem | |
ipsec pki --pub --in client.pem | ipsec pki --issue --cacert ca.cert.pem --cakey ca.pem --dn "C=DEMO, O=DEMO, CN=DEMO" --outform pem > client.cert.pem | |
mv ca.cert.pem /etc/ipsec.d/cacerts/ | |
mv server.cert.pem /etc/ipsec.d/certs/ | |
mv server.pem /etc/ipsec.d/private/ |
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 setup | |
uniqueids=never | |
conn ikev1 | |
keyexchange=ikev1 | |
left=%defaultroute | |
leftauth=psk | |
leftsubnet=0.0.0.0/0 | |
right=%any | |
rightauth=psk |
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
charon { | |
load_modular = yes | |
duplicheck.enable = no | |
compress = yes | |
plugins { | |
include strongswan.d/charon/*.conf | |
} | |
dns1 = 8.8.8.8 | |
dns2 = 8.8.4.4 | |
nbns1 = 8.8.8.8 |
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
javascriptfunction(){var styleElem=null,doc=document,ie=doc.all,fontColor=50,sel='body,body *';styleElem=createCSS(sel,setStyle(fontColor),styleElem);showTip(doc);if(ie){doc.attachEvent('onkeydown',onKeyDown)}else{doc.addEventListener('keydown',onKeyDown)};functwqqqqwwwwwwwwqweElem)};function setStyle(fontColor){var colorArr=[fontColor,fontColor,fontColor];return'background-color:#000 !important;color:RGB('+colorArr.join('%,')+'%) !important;'};function createCSS(sel,decl,styleElem){var doc=document,h=doc.getElementsByTagName('head')[0],styleElem=styleElem;if(!styleElem){s=doc.createElement('style');s.setAttribute('type','text/css');styleElem=ie?doc.styleSheets[doc.styleSheets.length-1]:h.appendChild(s)};if(ie){styleElem.addRule(sel,decl)}else{styleElem.innerHTML='';styleElem.appendChild(doc.createTextNode(sel+' {'+decl+'}'))};return styleElem};function showTip(){var tipElem=doc.createElement('div'),body=doc.getElementsByTagName('body')[0];tipElem.innerHTML='=== 夜间模式开启。提示: q 或 w 可减少增加字体亮度 ===';tipElem.style.c |