diff options
| author | shihaoyue <[email protected]> | 2024-09-06 23:46:02 +0800 |
|---|---|---|
| committer | shihaoyue <[email protected]> | 2024-09-06 23:46:02 +0800 |
| commit | 1ab3dc3d50d743cf3bbe38320644f84740c77d7b (patch) | |
| tree | c3d5969d3b559b5bd2bf06670c7140ce45891356 /server/apps | |
| parent | 9ec6b8af0a2cb7d9380664ff962cd8a779ca82a5 (diff) | |
bugfix policy
Diffstat (limited to 'server/apps')
| -rw-r--r-- | server/apps/policy.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/server/apps/policy.py b/server/apps/policy.py index 8b62a0a..b8882af 100644 --- a/server/apps/policy.py +++ b/server/apps/policy.py @@ -88,7 +88,7 @@ def target2polocy(task_policy): commmand = task_policy.Policy.p_payload # 固定 # <target> - commmand.replace("<target>", task_policy.task.target.target.addrv4) + commmand.replace("<target>", task_policy.task.target.addrv4) # 篡改 # <tamper> 目标域名 (DoH DoT) commmand.replace("<tamper>", task_policy.task.target_domain) @@ -109,15 +109,15 @@ def generate_parameters(task_policy): # 调整 # DDoS # <n> 启动请求发送的进程数(DoT DoH) 包数 (DNSSEC v6) - if task_policy.policy.Policy.p_proto=="DOH" or task_policy.policy.Policy.p_proto=="DOT": - commmand.replace("<n>", 4) - elif task_policy.policy.Policy.p_proto=="DNSSEC" : - commmand.replace("<n>", 30000) - elif task_policy.policy.Policy.p_proto=="IPv6": - commmand.replace("<n>", 10000) + if task_policy.Policy.p_proto=="DOH" or task_policy.Policy.p_proto=="DOT": + commmand.replace("<n>", '4') + elif task_policy.Policy.p_proto=="DNSSEC" : + commmand.replace("<n>", '30000') + elif task_policy.Policy.p_proto=="IPv6": + commmand.replace("<n>", '10000') # <r> 发包速率(DNSSEC) - if task_policy.policy.Policy.p_proto=="DNSSEC" : - commmand.replace("<r>", 300) + if task_policy.Policy.p_proto=="DNSSEC" : + commmand.replace("<r>", '300') # <round> 向CND节点发送的请求次数 (DoT) # <wait> pending 总时长 (DoT) |
