Re: [Tails-dev] Tails control port filter proxy in Whonix?

Delete this message

Reply to this message
Author: anonym
Date:  
To: The Tails public development discussion list
Subject: Re: [Tails-dev] Tails control port filter proxy in Whonix?
Patrick Schleizer:
> anonym:
>> Patrick Schleizer:
>>> Where I need to correct myself. The injected IP is probably difficult to
>>> add to a config file since IPs in Qubes will remain dynamic for some
>>> quite some time until Qubes 4.0. We'd need something like this.
>>>
>>>     ADD_ONION:
>>>       - pattern: 'NEW:BEST Port=80,(176[0-5][0-9])'
>>>         replacement: 'NEW:BEST Port=80,<client i.e. workstation IP>:{}'

>>>
>>> (Where <workstation IP> is just used to illustrate. Not a syntax
>>> suggestion. Could be expressed with any other special chars.)
>>>
>>> Could you implement that please?
>>
>> I hacked something together so that the following should work for you:
>>
>>     ADD_ONION:
>>       - pattern:     'NEW:BEST Port=80,(176[0-5][0-9])'
>>         replacement: 'NEW:BEST Port=80,{client-address}:{}'

>>
>> See attached patch, but note that I haven't tested it (and not pushed
>> it, since the branch is up for review, and I won't have time to test it
>> for that). If there's some silly syntax error, I bet you can fix it
>> yourself. :)
>
> Fixed some minor issues indeed. Patch attached.
>
> However, there is an offending line, I am stuck with.
>
> return r['replacement'].format(*match.groups()) + terminator
>
>   File "./tor-controlport-filter", line 334, in rewrite_line
>     return r['replacement'].format(*match.groups()) + terminator
> KeyError: 'client-address'

>
> Could you fix that please?


Yesterday's patch was trash. See the new commit(s) I've just pushed to
the branch.

Cheers!