如何将Laravel Sail实例与SSH隧道联系起来?
我有一个Laravel应用程序,它需要连接到具有非常严格访问要求的安全外部API。 AWS上有一个托管的处理程序,该处理程序具有一堆签名的证书等。由于这些要求,通过该特定服务器连接该API的唯一方法。
现在,要在本地计算机上测试内容,我将执行以下操作:
- SSH使用-D标志来设置袜子代理。
- 使用这将袜子袜子袜子转换代理。
- 设置Postman的代理设置以使用该HTTP代理。
一切都很好,我可以按预期完成请求。
但是,我也希望能够在当地的Laravel环境中使用代理,我使用帆。
问题是我不确定如何使容器与代理进行交互。使用本地计算机中的上面方法,我可以curl所需的端点恰好,但是如果我尝试通过容器本身进行操作,则拒绝连接。
任何帮助将不胜感激!
I have a Laravel app which needs to connect to a secure external API with very strict access requirements. There is a handler hosted on AWS which has a bunch of signed certificates etc. The only way to connect to that API is via that specific server due to those requirements.
Now, to test things on my local machine, I do the following:
- SSH to the server using the -D flag to set up a SOCKS proxy.
- Use this socks to http package to convert the proxy.
- Set up Postman's proxy settings to use that http proxy.
That all works fine and I can complete the requests as expected.
However, I'd like to be able to use the proxy in my local Laravel environment too, for which I use Sail.
The problem is that I'm unsure of how to get the container to interact with the proxy. Using the method above in my local machine, I can cURL the required endpoint just fine, but if I try to do it via the container itself, it refuses to connect.
Any help would be appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论