Closed mario-s closed 2 years ago
Please modify you docker-compose.yaml
proxy-tools:
image: grepplabs/kafka-proxy:v0.3.1-all
ports:
- "1080:1080"
command:
- 'tools'
- 'socks5-proxy'
- '--addr'
- '0.0.0.0:1080'
proxy-server:
image: grepplabs/kafka-proxy:v0.3.1-all
ports:
- "32400:32400"
- "32401:32401"
- "32402:32402"
command:
- 'server'
- '--bootstrap-server-mapping=kafka-0:9092,0.0.0.0:32400'
- '--bootstrap-server-mapping=kafka-1:9092,0.0.0.0:32401'
- '--bootstrap-server-mapping=kafka-2:9092,0.0.0.0:32402'
- '--forward-proxy=socks5://proxy-tools:1080'
- '--debug-enable'
and from the host try out the clients
kafka-console-producer.sh --broker-list 127.0.0.1:32400 --topic test
kafka-console-consumer.sh --bootstrap-server 127.0.0.1:32401 --topic test
Tested on the linux desktop.
Yes, this works for me as well. Thanks a lot!
Hi,
I have a question, regarding a SOCKS5 proxy within the same network of a Kafka cluster. All Kafka nodes and the Zookeeper are defined in a Docker compose file. They can interact with each other. But the moment I add a proxy and try to get access to it via the proxy, nothing happens. Is there something wrong with the setup for the proxy? I'm really not sure if the mapping is correct.