瀏覽代碼

minor tweaks to network performance

tags/v1.3.3
Jonathan Cobb 3 年之前
父節點
當前提交
6ca6202d03
共有 3 個檔案被更改,包括 8 行新增3 行删除
  1. +6
    -2
      bubble-server/src/main/java/bubble/rule/social/block/JsUserBlockerRuleDriver.java
  2. +1
    -1
      bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py
  3. +1
    -0
      bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_modify.py

+ 6
- 2
bubble-server/src/main/java/bubble/rule/social/block/JsUserBlockerRuleDriver.java 查看文件

@@ -43,8 +43,12 @@ public class JsUserBlockerRuleDriver extends AbstractAppRuleDriver implements Re
String clientAddr,
String serverAddr,
String fqdn) {
if (log.isInfoEnabled()) log.info("checkConnection("+fqdn+") returning filter for matcher="+harness.getMatcher().getName()+" with fqdn="+harness.getMatcher().getFqdn()+", rule="+harness.getRule().getName());
return ConnectionCheckResponse.filter;
if (harness.getMatcher().getFqdn().equals(fqdn)) {
if (log.isInfoEnabled()) log.info("checkConnection(" + fqdn + ") returning filter for matcher=" + harness.getMatcher().getName() + " with fqdn=" + harness.getMatcher().getFqdn() + ", rule=" + harness.getRule().getName());
return ConnectionCheckResponse.filter;
}
if (log.isInfoEnabled()) log.info("checkConnection(" + fqdn + ") returning noop for matcher=" + harness.getMatcher().getName() + " with fqdn=" + harness.getMatcher().getFqdn() + ", rule=" + harness.getRule().getName());
return ConnectionCheckResponse.noop;
}

@Getter(lazy=true) private final String defaultSiteJsTemplate = stream2string(getRequestModifierConfig().getSiteJsTemplate());


+ 1
- 1
bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_api.py 查看文件

@@ -556,7 +556,7 @@ def _header_modify(client_addr: str, ctx: dict, headers: nheaders.Headers) -> in
modifiers_dict[regex] = replacement
repl_count += _replace_in_headers(headers, modifiers_dict)

if log_debug:
if log_debug and repl_count > 0:
bubble_log.debug('_header_modify: replacing headers - replacements count: '+str(repl_count))

return repl_count


+ 1
- 0
bubble-server/src/main/resources/packer/roles/mitmproxy/files/bubble_modify.py 查看文件

@@ -317,6 +317,7 @@ def responseheaders(flow):
flex_flow = None
bubble_filter_response(flow, flex_flow)
response_header_modify(flow)
pass


def bubble_filter_response(flow, flex_flow):


Loading…
取消
儲存