|
|
@@ -613,6 +613,19 @@ func TestSteeringIP(t *testing.T) {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+func TestLegacyAPIEncoding(t *testing.T) {
|
|
|
+ runServer(t,
|
|
|
+ &runServerConfig{
|
|
|
+ tunnelProtocol: "OSSH",
|
|
|
+ requireAuthorization: true,
|
|
|
+ doTunneledWebRequest: true,
|
|
|
+ doTunneledNTPRequest: true,
|
|
|
+ doDanglingTCPConn: true,
|
|
|
+ doLogHostProvider: true,
|
|
|
+ useLegacyAPIEncoding: true,
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
type runServerConfig struct {
|
|
|
tunnelProtocol string
|
|
|
clientTunnelProtocol string
|
|
|
@@ -640,6 +653,7 @@ type runServerConfig struct {
|
|
|
inspectFlows bool
|
|
|
doSteeringIP bool
|
|
|
doTargetBrokerSpecs bool
|
|
|
+ useLegacyAPIEncoding bool
|
|
|
}
|
|
|
|
|
|
var (
|
|
|
@@ -1266,6 +1280,10 @@ func runServer(t *testing.T, runConfig *runServerConfig) {
|
|
|
clientConfig.MeekAdditionalHeaders = headers
|
|
|
}
|
|
|
|
|
|
+ if runConfig.useLegacyAPIEncoding {
|
|
|
+ clientConfig.TargetAPIEncoding = protocol.PSIPHON_API_ENCODING_JSON
|
|
|
+ }
|
|
|
+
|
|
|
if doInproxy {
|
|
|
|
|
|
// Limitation: can't exercise DisableTunnels = true since the client
|