mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 12:24:30 +08:00
注释一些未使用的函数,修改一处语法,更改io库
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
"text/template"
|
||||
@@ -28,7 +27,7 @@ func LinkAuth(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(r.Body)
|
||||
body, err := io.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
@@ -188,39 +187,40 @@ var auth_complete = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
</config-auth>
|
||||
`
|
||||
|
||||
var auth_profile = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd">
|
||||
// var auth_profile = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
// <AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd">
|
||||
|
||||
<ClientInitialization>
|
||||
<UseStartBeforeLogon UserControllable="false">false</UseStartBeforeLogon>
|
||||
<StrictCertificateTrust>false</StrictCertificateTrust>
|
||||
<RestrictPreferenceCaching>false</RestrictPreferenceCaching>
|
||||
<RestrictTunnelProtocols>IPSec</RestrictTunnelProtocols>
|
||||
<BypassDownloader>true</BypassDownloader>
|
||||
<WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment>
|
||||
<CertEnrollmentPin>pinAllowed</CertEnrollmentPin>
|
||||
<CertificateMatch>
|
||||
<KeyUsage>
|
||||
<MatchKey>Digital_Signature</MatchKey>
|
||||
</KeyUsage>
|
||||
<ExtendedKeyUsage>
|
||||
<ExtendedMatchKey>ClientAuth</ExtendedMatchKey>
|
||||
</ExtendedKeyUsage>
|
||||
</CertificateMatch>
|
||||
// <ClientInitialization>
|
||||
// <UseStartBeforeLogon UserControllable="false">false</UseStartBeforeLogon>
|
||||
// <StrictCertificateTrust>false</StrictCertificateTrust>
|
||||
// <RestrictPreferenceCaching>false</RestrictPreferenceCaching>
|
||||
// <RestrictTunnelProtocols>IPSec</RestrictTunnelProtocols>
|
||||
// <BypassDownloader>true</BypassDownloader>
|
||||
// <WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment>
|
||||
// <CertEnrollmentPin>pinAllowed</CertEnrollmentPin>
|
||||
// <CertificateMatch>
|
||||
// <KeyUsage>
|
||||
// <MatchKey>Digital_Signature</MatchKey>
|
||||
// </KeyUsage>
|
||||
// <ExtendedKeyUsage>
|
||||
// <ExtendedMatchKey>ClientAuth</ExtendedMatchKey>
|
||||
// </ExtendedKeyUsage>
|
||||
// </CertificateMatch>
|
||||
|
||||
<BackupServerList>
|
||||
<HostAddress>localhost</HostAddress>
|
||||
</BackupServerList>
|
||||
</ClientInitialization>
|
||||
// <BackupServerList>
|
||||
// <HostAddress>localhost</HostAddress>
|
||||
// </BackupServerList>
|
||||
// </ClientInitialization>
|
||||
|
||||
<ServerList>
|
||||
<HostEntry>
|
||||
<HostName>VPN Server</HostName>
|
||||
<HostAddress>localhost</HostAddress>
|
||||
</HostEntry>
|
||||
</ServerList>
|
||||
</AnyConnectProfile>
|
||||
`
|
||||
// <ServerList>
|
||||
// <HostEntry>
|
||||
// <HostName>VPN Server</HostName>
|
||||
// <HostAddress>localhost</HostAddress>
|
||||
// </HostEntry>
|
||||
// </ServerList>
|
||||
//
|
||||
// </AnyConnectProfile>
|
||||
// `
|
||||
var ds_domains_xml = `
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config-auth client="vpn" type="complete" aggregate-auth-version="2">
|
||||
|
Reference in New Issue
Block a user