Skip to content

Commit

Permalink
Merge pull request #642 from adotkhan/master
Browse files Browse the repository at this point in the history
OSSH prefix overrides OSSH seed transforms
  • Loading branch information
rod-hynes committed Jun 12, 2023
2 parents 2cda1d9 + cf5ce05 commit 281e2e7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions psiphon/dialParameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,8 +850,8 @@ func MakeDialParameters(

}

// OSSH seed transforms are applied only to the OSSH tunnel protocol, and
// not to any other protocol layered over OSSH.
// OSSH prefix and seed transform are applied only to the OSSH tunnel protocol,
// and not to any other protocol layered over OSSH.
if dialParams.TunnelProtocol == protocol.TUNNEL_PROTOCOL_OBFUSCATED_SSH {

if serverEntry.DisableOSSHTransforms {
Expand Down Expand Up @@ -894,6 +894,14 @@ func MakeDialParameters(
dialParams.OSSHPrefixSpec = nil
}
}

// OSSHPrefix supersedes OSSHObfuscatorSeedTransform.
// This ensures both tactics are not used simultaneously,
// until OSSHObfuscatorSeedTransform is removed.
if dialParams.OSSHPrefixSpec != nil {
dialParams.OSSHObfuscatorSeedTransformerParameters = nil
}

}

if protocol.TunnelProtocolUsesMeekHTTP(dialParams.TunnelProtocol) {
Expand Down

0 comments on commit 281e2e7

Please sign in to comment.