소스 검색

Support 'none' in torrc for HiddenServiceExportCircuitID.

See: https://bugs.torproject.org/4700
Alexander Færøy 7 년 전
부모
커밋
8ecaf41003
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 1
      doc/tor.1.txt
  2. 4 1
      src/feature/hs/hs_config.c

+ 2 - 1
doc/tor.1.txt

@@ -2838,7 +2838,8 @@ The following options are used to configure a hidden service.
 [[HiddenServiceExportCircuitID]] **HiddenServiceExportCircuitID** __protocol__::
 [[HiddenServiceExportCircuitID]] **HiddenServiceExportCircuitID** __protocol__::
    The onion service will use the given protocol to expose the global circuit
    The onion service will use the given protocol to expose the global circuit
    identifier of each inbound client circuit via the selected protocol. The only
    identifier of each inbound client circuit via the selected protocol. The only
-   protocol supported right now \'haproxy\'. This option is only for v3 services.
+   protocol supported right now \'haproxy\'. This option is only for v3
+   services. (Default: none)
 
 
 [[HiddenServiceMaxStreams]] **HiddenServiceMaxStreams** __N__::
 [[HiddenServiceMaxStreams]] **HiddenServiceMaxStreams** __N__::
    The maximum number of simultaneous streams (connections) per rendezvous
    The maximum number of simultaneous streams (connections) per rendezvous

+ 4 - 1
src/feature/hs/hs_config.c

@@ -161,8 +161,11 @@ helper_parse_circuit_id_protocol(const char *key, const char *value, int *ok)
   if (! strcasecmp(value, "haproxy")) {
   if (! strcasecmp(value, "haproxy")) {
     *ok = 1;
     *ok = 1;
     ret = HS_CIRCUIT_ID_PROTOCOL_HAPROXY;
     ret = HS_CIRCUIT_ID_PROTOCOL_HAPROXY;
+  } else if (! strcasecmp(value, "none")) {
+    *ok = 1;
+    ret = HS_CIRCUIT_ID_PROTOCOL_NONE;
   } else {
   } else {
-    log_warn(LD_CONFIG, "%s must be 'haproxy'.", key);
+    log_warn(LD_CONFIG, "%s must be 'haproxy' or 'none'.", key);
     goto err;
     goto err;
   }
   }