|
|
@@ -156,6 +156,7 @@ func (session *Session) doHandshakeRequest() error {
|
|
|
if len(configLine) == 0 {
|
|
|
return ContextError(errors.New("no config line found"))
|
|
|
}
|
|
|
+
|
|
|
// Note:
|
|
|
// - 'preemptive_reconnect_lifetime_milliseconds' is currently unused
|
|
|
// - 'ssh_session_id' is ignored; client session ID is used instead
|
|
|
@@ -165,11 +166,14 @@ func (session *Session) doHandshakeRequest() error {
|
|
|
PageViewRegexes []map[string]string `json:"page_view_regexes"`
|
|
|
HttpsRequestRegexes []map[string]string `json:"https_request_regexes"`
|
|
|
EncodedServerList []string `json:"encoded_server_list"`
|
|
|
+ VpnPsk string `json:"l2tp_ipsec_psk"`
|
|
|
}
|
|
|
err = json.Unmarshal(configLine, &handshakeConfig)
|
|
|
if err != nil {
|
|
|
return ContextError(err)
|
|
|
}
|
|
|
+
|
|
|
+ // Store discovered server entries
|
|
|
for _, encodedServerEntry := range handshakeConfig.EncodedServerList {
|
|
|
serverEntry, err := DecodeServerEntry(encodedServerEntry)
|
|
|
if err != nil {
|
|
|
@@ -180,6 +184,7 @@ func (session *Session) doHandshakeRequest() error {
|
|
|
return ContextError(err)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// TODO: formally communicate the sponsor and upgrade info to an
|
|
|
// outer client via some control interface.
|
|
|
for _, homepage := range handshakeConfig.Homepages {
|
|
|
@@ -188,6 +193,10 @@ func (session *Session) doHandshakeRequest() error {
|
|
|
if handshakeConfig.UpgradeClientVersion != "" {
|
|
|
Notice(NOTICE_UPGRADE, "%s", handshakeConfig.UpgradeClientVersion)
|
|
|
}
|
|
|
+ if handshakeConfig.VpnPsk != "" {
|
|
|
+ Notice(NOTICE_VPN_PSK, "%s", handshakeConfig.VpnPsk)
|
|
|
+ }
|
|
|
+
|
|
|
session.statsRegexps = MakeRegexps(
|
|
|
handshakeConfig.PageViewRegexes,
|
|
|
handshakeConfig.HttpsRequestRegexes)
|