Esempio n. 1
0
def set_proxy_tls_bypass_mode(bypass_mode):
    #set_paths()
    hal_init()
    stub = proxy_pb2.ProxyStub(HalChannel)
    req_msg = proxy_pb2.ProxyGlobalCfgRequestMsg()
    req_spec = req_msg.request.add()
    req_spec.proxy_type = types_pb2.PROXY_TYPE_TLS
    req_spec.bypass_mode = bypass_mode
    resp_msg = stub.ProxyGlobalCfg(req_msg)
    if resp_msg.api_status[0] != types_pb2.API_STATUS_OK:
        print(" Failed to set TLS Proxy bypass mode: HAL API Status:%d" %
              (resp_msg.api_status[0]))
        assert (0)
        return
    print("Set TLS Proxy bypass mode:%d" % bypass_mode)
    return
Esempio n. 2
0
def GetQidProxycbGetFlowInfo(objlist):
    if not IsConfigAllowed(objlist): return
    stub = proxy_pb2.ProxyStub(HalChannel)
    __config(objlist, proxy_pb2.ProxyGetFlowInfoRequestMsg,
             stub.ProxyGetFlowInfo)
    return
Esempio n. 3
0
def ConfigureProxyCbService(objlist):
    if not IsConfigAllowed(objlist): return
    stub = proxy_pb2.ProxyStub(HalChannel)
    __config(objlist, proxy_pb2.ProxyFlowConfigRequestMsg,
             stub.ProxyFlowConfig)
    return