大网数据广告活动
服务器运维问答

Use of :80 in proxy URL

· 52CE 我爱测

Setting some Squid proxies up, and trying to figure out some behavior. Squid in a pass-all configuration, with the linux node set to forward 80 to port 3128, which Squid is listening on. I do have an AWS NLB in front of the proxy…

问题原文

原帖链接 · DavisTasar · CC BY-SA 4.0

Setting some Squid proxies up, and trying to figure out some behavior.

Squid in a pass-all configuration, with the linux node set to forward 80 to port 3128, which Squid is listening on.

I do have an AWS NLB in front of the proxy, however the same behavior occurs when I target the proxy via the dedicated host IP address.

How are:

curl -v --proxy http://my-proxy-pal.lab.my_domain.com:80 https://www.microsoft.com

and

curl -v --proxy http://my-proxy-pal.lab.my_domain.com https://www.microsoft.com

Not the same curl command? HTTP operates on tcp/80? When you do the :80 (or :3128), the request passes through, but if you omit it, the request fails.

I'm assuming that it has something to do with the behavior of http vs tcp, but I'm not 100% certain. So, anyone with some insight on that behavior, super appreciated on the right direction.

已采纳解答

原帖链接 · DavisTasar · CC BY-SA 4.0

I found it as I started digging through the man pages of curl

https://curl.se/docs/manpage.html#-x

If the port number is not specified in the proxy string, it is assumed to be 1080.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-01-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。