[FEATURE REQUEST] grep all possibilities of target port
nyxnor opened this issue · 4 comments
nyxnor commented
Is your feature request related to a problem? Please describe.
HiddenServicePort can be:
VIRTPORT
VIRTPORT TARGETPORT
VIRTPORT TARGETADDR
VIRTPORT TARGETADDR:TARGETPORT
The script creates the 4th option.
The script can detect the 1st and the 4th option.
Describe the solution you'd like
Detect 2nd and 3rd option port
Describe alternatives you've considered
Additional context
nyxnor commented
VIRTPORT = VIRTPORT 127.0.0.1:VIRTPORT
VIRTPORT TARGETPORT = VIRTPORT 127.0.0.1:TARGETPORT
VIRTPORT TARGETADDR = VIRTPORT TARGETADDR:VIRTPORT
VIRTPORT TARGETADDR:TARGETPORT = VIRTPORT TARGETADDR:TARGETPORT
nyxnor commented
First thing, you should use a separate torrc file for onionjuggler because it will constantly add and delete services when requested and should not be manually edited.
nyxnor commented
check against dumped config
nyxnor commented
grep -q \
-e "^HiddenServicePort ${target_port}$" \
-e "^HiddenServicePort .* ${target_port}$" \
-e "^HiddenServicePort .* ${target_addr}$" \
-e "^HiddenServicePort .* ${target}$" \
"${file}"