If the client supplies a default username, the
parse_connection_name
function can be used
to modify the username, and the address and port of the destination server.
Example 4.41. Dynamically change username and server address |
---|
The following proxy class examines the username sent by the client and modifies the username and the address of the destination server. If the client sends and unknown username, the connection is rejected. class MyRdpProxy(RdpProxy): def parse_connection_name(self, conn_name): if (conn_name == "j@svr1"): return ("joe", "1.1.1.1", 3389) elif (conn_name == "a@svr1"): return ("Administrator", "1.1.1.1", 3389) elif (conn_name == "j@svr2"): return ("joe", "2.2.2.2", 3389) elif (conn_name == "a@svr2"): return ("Administrator", "2.2.2.2", 3389) return (None) def config(self): RdpProxy.config(self) |
Published on May 30, 2024
© BalaSys IT Ltd.
Send your comments to support@balasys.hu