mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-27 17:15:49 +03:00
[GH-ISSUE #1712] Not catching request if host is an IP address (from within Docker container) #1705
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1705
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sandrodz on GitHub (Jul 6, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1712
Description
When doing requests directly to an IP address proxyman is not catching requests.
Steps to Reproduce
curl http://google.comrequest is logged correctlycurl http://21.72.127.222:8089/api/operation/getPriceTypesrequest is missing from proxymanEnvironment
@NghiaTranUIT commented on GitHub (Jul 7, 2023):
@sandrodz Can you use
--proxy localhost:9090in your cURL command? I guesscURLdoesn't send the request (with IP address) to Proxyman, so Proxyman could not capture.@NghiaTranUIT commented on GitHub (Jul 7, 2023):
Here is example:
https://github.com/ProxymanApp/Proxyman/assets/5878421/9f4c2dc6-f0ed-4c54-a6eb-d8cf6c0f5423
If you don't want to use
--proxy localhost:9090flag, you might use Automatic Script and start your docker, run bash in the new Terminal.It's injected some code (for example, override HTTP_PROXY and HTTPS_PROXY env), so Proxyman can automatically capture all traffic.
@sandrodz commented on GitHub (Jul 19, 2023):
@NghiaTranUIT I am encountering this from within docker container.
From the local machine it works fine. Like you've demonstrated.
@NghiaTranUIT commented on GitHub (Jul 19, 2023):
@sandrodz Have you tried to start the Docker Container within the Automatic Script Terminal ?
@sandrodz commented on GitHub (Jul 19, 2023):
@NghiaTranUIT yes, and result is same. I am not sure how setting env variables helps containers.
@NghiaTranUIT commented on GitHub (Jul 19, 2023):
@sandrodz can you follow this Doc to setup the HTTP Proxy in Docker env? https://docs.docker.com/network/proxy/
Should point to
http://localhost:9090orhttp://127.0.0.1:9090@sandrodz commented on GitHub (Jul 19, 2023):
@NghiaTranUIT this worked:
@sandrodz commented on GitHub (Jul 19, 2023):
@NghiaTranUIT this is generally a better way via docker-compose.proxyman.yml override:
docker-compose -f docker-compose.yml -f docker-compose.php8.1-fpm-xdebug.yml -f docker-compose.proxyman.yml up -dThis is better and requires no docker daemon restart. When switching on/off.
@NghiaTranUIT commented on GitHub (Jul 20, 2023):
Thanks @sandrodz I will update your suggestion to the Docker Documentation
@sandrodz commented on GitHub (Jul 20, 2023):
@NghiaTranUIT but still, proxyman doesn't need anything to route non-ip based traffic from containers why ip is different? I think its better to resolve at the source. So we don't have to route traffic deliberatly.
This is a only gripe I've with proxyman with docker.
Otherwise I love this product (even purchasd license to support you guys).
@NghiaTranUIT commented on GitHub (Jul 20, 2023):
Thanks. I will find a better solution to make it works out of the box.