exp ld_preload
This commit is contained in:
parent
12f39f6088
commit
e754be81f4
1 changed files with 12 additions and 1 deletions
13
exp.py
13
exp.py
|
|
@ -305,6 +305,9 @@ CONFIGS = {
|
|||
"idle": "idle - - - - - - - - - 600.000194311142 0.0 1822 6541 1.3880000000000052 304283035 -",#TODO
|
||||
"notify_listen": ("0.0.0.0", 8090),
|
||||
"notify_addr": "TODO:8090",
|
||||
"ld_preload": {
|
||||
"openssl": "LD_PRELOAD=/home/pengelib/openssl-openssl-3.6.1/libssl.so.3:/home/pengelib/openssl-openssl-3.6.1/libcrypto.so.3",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -631,11 +634,13 @@ def make_everything(exp_dir, domains, make_ca):
|
|||
os.makedirs(algdir, exist_ok=True)
|
||||
make_certs(algdir, domains, alg, make_ca)
|
||||
|
||||
def run_netreplay_server(ssh, exp_dir, repo_dir, record, listen_addr, listen_port, tls, impl, certs_dir, only_record=None, ciphers=None, kexes=None, debug=False):
|
||||
def run_netreplay_server(ssh, exp_dir, repo_dir, record, listen_addr, listen_port, tls, impl, certs_dir, only_record=None, ciphers=None, kexes=None, debug=False, ld_preload=None):
|
||||
if exp_dir[-1] != "/":
|
||||
exp_dir += "/"
|
||||
repo_dir = repo_dir.removesuffix("/")
|
||||
env = {"RUST_LOG": "warning", "SSLKEYLOGFILE": "/dev/shm/netreplay.keys.txt"}
|
||||
if ld_preload and impl in ld_preload:
|
||||
env["LD_PRELOAD"] = ld_preload[impl]
|
||||
if ciphers:
|
||||
env["CIPHERS"] = ciphers
|
||||
if kexes:
|
||||
|
|
@ -654,6 +659,8 @@ def run_netreplay_client(ssh, exp_dir, repo_dir, record, remote_addr, remote_por
|
|||
exp_dir += "/"
|
||||
repo_dir = repo_dir.removesuffix("/")
|
||||
env = {"RUST_LOG": "warning", "SSLKEYLOGFILE": "/dev/shm/netreplay.keys.txt", "EARLYDATA": earlydata}
|
||||
if ld_preload and impl in ld_preload:
|
||||
env["LD_PRELOAD"] = ld_preload[impl]
|
||||
if ciphers:
|
||||
env["CIPHERS"] = ciphers
|
||||
if kexes:
|
||||
|
|
@ -863,6 +870,7 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
|
|||
ciphers=cipher,
|
||||
kexes=kex,
|
||||
debug=debug,
|
||||
ld_preload=config["ld_preload"] if "ld_preload" in config else None,
|
||||
)
|
||||
netreplay = run_netreplay_client(
|
||||
ssh,
|
||||
|
|
@ -880,6 +888,7 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
|
|||
earlydata=earlydata,
|
||||
debug=debug,
|
||||
notify_addr=config["notify_addr"],
|
||||
ld_preload=config["ld_preload"] if "ld_preload" in config else None,
|
||||
)
|
||||
else:
|
||||
netreplay = run_netreplay_server(
|
||||
|
|
@ -896,6 +905,7 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
|
|||
ciphers=cipher,
|
||||
kexes=kex,
|
||||
debug=debug,
|
||||
ld_preload=config["ld_preload"] if "ld_preload" in config else None,
|
||||
)
|
||||
netreplay = run_netreplay_client(
|
||||
None,
|
||||
|
|
@ -913,6 +923,7 @@ def run_exp(config, only_record=None, idle=False, shutdown=False, debug=False):
|
|||
earlydata=earlydata,
|
||||
debug=debug,
|
||||
notify_addr=config["notify_addr"],
|
||||
ld_preload=config["ld_preload"] if "ld_preload" in config else None,
|
||||
)
|
||||
|
||||
prof_filename = "-"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue