Request feature: Different network interfaces support (some IP). #10269
Comments
ariya.hi...@gmail.com commented:
|
I wonder if that feature possible since it's been two years... |
I think @vitallium had mentioned something about this to me before...? |
Yes. This feature is almost implemented. I think it will be ready soon. |
Hi, I started enjoying phantomjs on a linux server with many virtual ips. I am also interested in this issue, in order to make requests with different available ips, like I usually do with curl. I was just wondering how was the work-in-progress... any news? Cheers |
Update from @vitallium on #10378:
|
Hey, just a quick search of the repo shows many results for localAddress in the C++ sources. Is this close to being implemented or is it out in 2.0? Would love to be able to specify my network interface when making requests, and I'm happy to help out wherever possible, but I thought I'd check in first. Cheers! |
I see that feature needed qtwebkit 5.0 in PhantomJS 2.0. @vitallium, if you have any code to start it looks like there may be people who are willing to work on this. |
Doesn't look like this is going to get implemented unless somebody does it and submits a pull request. |
Any news about this feature please? |
@vitallium Do you have an update on the implementation you were working on? |
@zackw this feature is not possible to implement without modifying QtWebkit code. |
I was afraid of that. |
@vitallium Can tell me how to modify QtWebkit code to implement this feature? |
@XiaoChenMa I'm pretty sure that figuring out how to modify QtWebkit code to implement this feature would be at least 90% of the work. Therefore, if we knew what to tell you, we would already have implemented it ourselves. I can get you started, though: read the code in If you don't know how the low-level socket API works, read all of chapter 16 of the GNU C Library manual: https://www.gnu.org/software/libc/manual/html_node/Sockets.html |
Has there been any movement on this issue. I really don't want to have to manage an IPTABLE when phantomjs can bind the interface for me. |
Guys... After 4 year.. I advise to use sqiud. I live 4 years with 32k ips and squid. Everything is ... yofi! |
If you can use LD_PRELOAD just use something like fixsrcip to overwrite connect() and bind to whatever IP you want. A bit of a hacky solution but less overhead than running everything through squid. |
Well.. Single instace of squid could accept more connections with less memory usage. But everything depends on the task body. Anyway.. I see no reason to reduse usage of resources because of server power is enough for my tasks. |
Sorry, I was suggesting fixsrcip as a potential generic workaround. I didn't mean you specifically. There's no need to run a whole proxy server just to bind to an interface as long as you're not running it as root. |
I got it. Sorry too. I mean I have some servers with phantom and one gate. Anyway this feature could be implemented with much ease than overcoding QT engine. So closing is the optimal option for this task for now. |
Please don't close issues just because you have found a workaround. We will get to this - eventually. |
But the implementation is impossible. Okay, it Conclusion. By saying impossible I mean that it is IMPOSSIBLE to implement this feature without modifing the QT core. But it is also impossible to modify qt core, because of the back lagacy problem. So it will not be implemented for years. |
Has anyone tried this with forcebindip? With forcebindip I am able to bind any program to any interface. I don't know if it would work with Selenium and Phantomks https://r1ch.net/projects/forcebindip |
My solution in theory would work, but in practice has been hit or miss. Using Docker containers you can bind to a specific interface using Docker networks. In practice I haven't had much luck, maybe this would help somebody down the road.
This binds all of Docker under that specific interface, sometimes I had to do this for it to work. Using compose to create a network
Often I've had to create an IP tables rule, to route the docker bridge traffic to the interface's IP I use Puppet to place the wlan1 IP address in these files. Documentation on this functionality is also very vague, or I don't understand lower level networking. |
Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution! |
chistyak...@gmail.com commented:
Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #269.
🌟 6 people had starred this issue at the time of migration.
The text was updated successfully, but these errors were encountered: