瀏覽代碼

Use single-hop intro and rend circuits when in tor2web mode

Robert Ransom 14 年之前
父節點
當前提交
826f1d5b0a
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/or/circuituse.c

+ 6 - 0
src/or/circuituse.c

@@ -1489,6 +1489,12 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn,
     else
       new_circ_purpose = desired_circuit_purpose;
 
+    if (options->Tor2webMode &&
+        (new_circ_purpose == CIRCUIT_PURPOSE_C_ESTABLISH_REND ||
+         new_circ_purpose == CIRCUIT_PURPOSE_C_INTRODUCING)) {
+      want_onehop = 1;
+    }
+
     {
       int flags = CIRCLAUNCH_NEED_CAPACITY;
       if (want_onehop) flags |= CIRCLAUNCH_ONEHOP_TUNNEL;