Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outgoing IP #47

Open
blackcatt opened this issue Jan 3, 2023 · 1 comment
Open

outgoing IP #47

blackcatt opened this issue Jan 3, 2023 · 1 comment

Comments

@blackcatt
Copy link

Hi, thanks for good tool!
How to use binance api with different IP on my server? (without proxy)
I have multiple IP from my ISP, attached to debian11 and know that curl can do this via the CURLOPT_INTERFACE directive.
But how to use it in the setOptions func?

@zhouaini528
Copy link
Owner

$binance->setOptions([
   'curl'=>[
       CURLOPT_PROXY => '127.0.0.1',
       CURLOPT_PROXYPORT => '10808',
       CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5,
   ]
]);

The way I use it is to set up a proxy server locally, and the proxy server can distribute your multiple IPs. PHP has completed the use of multiple IPs through CURLPROXY_SOCKS5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants