Latest working version of the 40_ tor-browser.yml I am using. It takes effect after running sudo ln -s /usr/share/doc/onion-grater-merger/examples/40_tor-browser.yml /usr/local/etc/onion-grater-merger.d/
The WIP section for circuit-status
and related onion-grater debug output is posted below it.
---
- exe-paths:
- '*'
users:
- '*'
hosts:
- '*'
commands:
SIGNAL:
- 'NEWNYM'
GETINFO:
- 'circuit-status'
GETCONF:
- pattern: 'bridge'
response:
- pattern: '250-Bridge=(.+) (\S+) (\S+) (\S+) (\S+)'
replacement: '250-Bridge='
- pattern: '250 Bridge=(.+) (\S+) (\S+) (\S+) (\S+)'
replacement: '250 Bridge='
events:
STREAM:
restrict-stream-events: true
GETINFO:
- pattern: 'circuit-status'
response:
- pattern: '250(.+)circuit-status=(\S+) (\S+) (.+) (\S+) (\S+)'
- replacement: '250+circuit-status='
The onion-grater debug mode:
host onion-grater[8471]: - pattern: circuit-status
host onion-grater[8471]: response:
host onion-grater[8471]: - {pattern: 250(.+)circuit-status=(\S+) (\S+) (.+) (\S+) (\S+)}
host onion-grater[8471]: - {replacement: 250+circuit-status=}
host onion-grater[8471]: SIGNAL:
host onion-grater[8471]: - {pattern: NEWNYM}
host onion-grater[8471]: events:
host onion-grater[8471]: CONF_CHANGED: {suppress: true}
host onion-grater[8471]: SIGNAL: {suppress: true}
host onion-grater[8471]: STATUS_SERVER: {suppress: true}
host onion-grater[8471]: STREAM: {}
host onion-grater[8471]: restrict-stream-events: false
host onion-grater[8471]: 10.152.152.11:56158 (filter: 30_autogenerated): -> getinfo circuit-status
host onion-grater[8471]: 10.152.152.11:56158 (filter: 30_autogenerated) disconnected: client quit
host onion-grater[8471]: ----------------------------------------
host onion-grater[8471]: Exception happened during processing of request from ('10.152.152.11', 56158)
host onion-grater[8471]: Traceback (most recent call last):
host onion-grater[8471]: File "/usr/lib/python3.7/socketserver.py", line 650, in process_request_thread
host onion-grater[8471]: self.finish_request(request, client_address)
host onion-grater[8471]: File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
host onion-grater[8471]: self.RequestHandlerClass(request, client_address, self)
host onion-grater[8471]: File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
host onion-grater[8471]: self.handle()
host onion-grater[8471]: File "/usr/lib/onion-grater", line 661, in handle
host onion-grater[8471]: session.handle()
host onion-grater[8471]: File "/usr/lib/onion-grater", line 481, in handle
host onion-grater[8471]: response_rewriter=response_rewriter)
host onion-grater[8471]: File "/usr/lib/onion-grater", line 277, in proxy_line
host onion-grater[8471]: new_response = response_rewriter(response)
host onion-grater[8471]: File "/usr/lib/onion-grater", line 462, in _response_rewriter
host onion-grater[8471]: lines)
host onion-grater[8471]: File "/usr/lib/onion-grater", line 314, in rewrite_matched_lines
host onion-grater[8471]: for line in split_lines]) + "\r\n"
host onion-grater[8471]: File "/usr/lib/onion-grater", line 314, in <listcomp>
host onion-grater[8471]: for line in split_lines]) + "\r\n"
host onion-grater[8471]: File "/usr/lib/onion-grater", line 307, in rewrite_matched_line
host onion-grater[8471]: return self.rewrite_line(replacers, line)
host onion-grater[8471]: File "/usr/lib/onion-grater", line 298, in rewrite_line
host onion-grater[8471]: match = re.match(r['pattern'] + "$", line)
host onion-grater[8471]: KeyError: 'pattern'
host onion-grater[8471]: ----------------------------------------
i want to know what the error means so I can work around it.
My guess is it doesn’t like the relay names because the “$”’ part is breaking it somehow. Or maybe something to do with newlines?