MCPcopy Create free account
hub / github.com/Frontrooms/3.0-GC / ProbabilisticStrategy

Class ProbabilisticStrategy

proxy.py:108–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107
108class ProbabilisticStrategy(TlsStrategy):
109 def __init__(self, p: float):
110 self.p = p
111 super().__init__()
112
113 def should_intercept(self, server_address: connection.Address) -> bool:
114 return random.uniform(0, 1) < self.p
115
116
117class MaybeTls:

Callers 1

configureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected