AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[proxy](server)

Martin Hope
asd asd
Asked: 2024-12-20 09:16:20 +0800 CST

Squid:如何阻止自动下载文件的 URL

  • 6

需要阻止源“github.com/user-attachments/files/16246802/README.txt”。

它也被写入黑名单文件中

在 squid.conf 中:

acl need_to_block dsdom_regex “/etc/squid/blacklists/block.txt”

http_access 拒绝 need_to_block

下载文件没有问题,也可以访问其他带有“https”的资源

我应该修复什么才能使其拒绝访问?

proxy
  • 1 个回答
  • 63 Views
Martin Hope
exore
Asked: 2024-10-23 18:24:54 +0800 CST

当 squid 监听 2 个端口时如何仅验证一个端口

  • 5

我想让 squid 监听端口 3128 和 3129。我想在 3129 上进行身份验证,在 3128 上不进行身份验证。目前我有以下配置

# auth_param not shown but working

http_port 3128
http_port 3129
acl input_3128 myportname 3128
acl input_3129 myportname 3129
acl authenticated proxy_auth REQUIRED

http_access allow authenticated input_3129
http_access deny input_3129
http_access allow input_3128
http_access deny all

不幸的是,这根本不起作用。Squid 总是需要身份验证。

示例请求:

curl -v --proxy http://myproxy.example.com:3128 http://debian.org/

鱿鱼反应:

* processing: http://debian.org/
10.1.2.3:3128...
* Connected to myproxy.example.com (10.1.2.3) port 3128
> GET http://debian.org/ HTTP/1.1
> Host: debian.org
> User-Agent: curl/8.2.1
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 407 Proxy Authentication Required
< Server: squid/5.9
< Mime-Version: 1.0
< Date: Wed, 23 Oct 2024 10:15:01 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 3511
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Vary: Accept-Language
< Content-Language: en
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from myproxy
< X-Cache-Lookup: NONE from myproxy:3129
< Via: 1.1 myproxy (squid/5.9)
< Connection: keep-alive
<

问题

如何让 squid 仅在端口 3129 上需要身份验证?

proxy
  • 2 个回答
  • 47 Views
Martin Hope
Xu Shijie
Asked: 2024-07-26 15:02:55 +0800 CST

Ray Cluster 设置“proxyconnect tcp:拨号 tcp 连接被拒绝”

  • 6

在设置 Ray Cluster 期间重复出现“proxyconnect tcp:拨号 tcp 127.0.0.1:1082:连接:连接被拒绝”,那么在哪里可以使用代理配置 K8S?

按照Ray CLuster 快速入门说明进行操作:

helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update

# Install both CRDs and KubeRay operator v1.1.1.
helm install kuberay-operator kuberay/kuberay-operator --version 1.1.1

# Confirm that the operator is running in the namespace `default`.
kubectl get pods
# NAME                                READY   STATUS    RESTARTS   AGE
# kuberay-operator-7fbdbf8c89-pt8bk   1/1     Running   0          27s 

在步骤2中,我得到了一个ErrImagePull状态窗格,以及实际的输出:

(base) ➜  ~ helm install kuberay-operator kuberay/kuberay-operator --version 1.0.0                                                                                                                     [36/197]
NAME: kuberay-operator                                                                                                                                                                                         
LAST DEPLOYED: Fri Jul 26 08:56:30 2024                                                                                                                                                                        
NAMESPACE: default                                                                                                                                                                                             
STATUS: deployed                                                                                                                                                                                               
REVISION: 1
TEST SUITE: None        
(base) ➜  ~ kubectl get pods                                                                           
NAME                                READY   STATUS         RESTARTS   AGE
kuberay-operator-5d64d88fdb-shrkv   0/1     ErrImagePull   0          10s
(base) ➜  ~ kubectl describe pod kuberay-operator-5d64d88fdb-shrkv 
Name:             kuberay-operator-5d64d88fdb-shrkv 
Namespace:        default              
Priority:         0                
Service Account:  kuberay-operator                                                                     
Node:             kind-control-plane/172.23.0.2                                                        
Start Time:       Fri, 26 Jul 2024 08:56:31 +0800
Labels:           app.kubernetes.io/component=kuberay-operator    
                  app.kubernetes.io/instance=kuberay-operator     
                  app.kubernetes.io/name=kuberay-operator                                                                                                                                                      
                  pod-template-hash=5d64d88fdb         
.....
Events:
  Type     Reason     Age               From               Message
  ----     ------     ----              ----               -------
  Normal   Scheduled  22s               default-scheduler  Successfully assigned default/kuberay-operator-5d64d88fdb-shrkv to kind-control-plane
  Normal   BackOff    21s               kubelet            Back-off pulling image "kuberay/operator:v1.0.0"
  Warning  Failed     21s               kubelet            Error: ImagePullBackOff
  Normal   Pulling    6s (x2 over 21s)  kubelet            Pulling image "kuberay/operator:v1.0.0"
  Warning  Failed     6s (x2 over 21s)  kubelet            Failed to pull image "kuberay/operator:v1.0.0": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/kuberay/operator:v1.0.0"
: failed to resolve reference "docker.io/kuberay/operator:v1.0.0": failed to do request: Head "https://registry-1.docker.io/v2/kuberay/operator/manifests/v1.0.0": proxyconnect tcp: dial tcp 127.0.0.1:1082: connect: connection refused
  Warning  Failed     6s (x2 over 21s)  kubelet            Error: ErrImagePull

难题的问题是消息:proxyconnect tcp:dial tcp 127.0.0.1:1082:connect:连接被拒绝

我尝试了以下方法但没有找到任何代理配置:

(base) ➜  ~  echo $HTTP_PROXY

(base) ➜  ~  echo $HTTPS_PROXY

(base) ➜  ~ cat /etc/environment                 
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
(base) ➜  ~ cat /etc/docker/daemon.json 
{
    "registry-mirrors": [
        "https://5wxalzzb.mirror.aliyuncs.com",    
        "https://hub-mirror.c.163.com",
        "https://mirror.iscas.ac.cn",
        "https://docker.m.daocloud.io"
    ],
    "runtimes": {
        "nvidia": {
            "args": [],
            "path": "nvidia-container-runtime"
        }
    }
}

为了缓解 pod 问题,我启动了本地端口 1082,这是一个没有 AuthZ 和 AuthN 的 HTTP 代理,然后再次重新安装 kubera/operator,但代理的错误事件消息相同。

proxy
  • 1 个回答
  • 154 Views
Martin Hope
TSG
Asked: 2024-02-18 21:52:33 +0800 CST

kpssvc 服务无法在 DC 上启动

  • 5

我有一个包含 2 个站点的域,每个站点都有自己的 2019 DC。在(辅助)站点上,我看到一条警报,提示 KPSSVC 服务(KDC 代理服务器服务)未启动。并且它的启动类型设置为自动。

当我尝试启动该服务时,Windows 回复“Windows 无法在本地计算机上启动 KDC 代理服务器服务 (KPSSVC)。错误 5:访问被拒绝”。我正在尝试以域管理员身份登录时启动该服务。

我没有任何子 OU,这是一个非常简单的域。

proxy
  • 1 个回答
  • 17 Views
Martin Hope
xstack
Asked: 2024-02-09 11:00:54 +0800 CST

Squid 代理:关于无缓存和 https 传输的问题

  • 5

我有一个运行鱿鱼的 Debian 10 VPS。我对conf 文件所做的唯一修改是允许我的IP 地址访问它。看起来运行良好。[1] 我想关闭缓存。我使用鱿鱼的唯一原因是改变我的明显IP。作为 Web 开发人员,缓存是开发编码阶段的一个威胁。

我找到了有关关闭缓存的各种信息,但不知道确切的位置。

维基百科说:

您可以使用缓存访问列表使 Squid 不再缓存任何响应:
缓存拒绝所有

但经过几个小时的滚动和搜索conf文件后,我找不到任何接近“缓存访问列表”的内容。

这个论坛上的一个帖子说:

acl 目录 urlpath_regex ^/这里/ ^/favicon.ico ^/那里/
缓存拒绝目录
缓存拒绝所有

我到底应该把这些命令放在哪里?

[2] 当我的浏览器请求某个页面(可能来自 https://amazon.com)时, 数据包是否经过加密 (SSL) 离开我的网站并传输到代理?

非常感谢,xstack

proxy
  • 1 个回答
  • 35 Views
Martin Hope
byteit101
Asked: 2023-12-15 10:17:47 +0800 CST

如何连接到 Xen XAPI/XCP-NG VNC/RFB 连接 URL?

  • 5

如何连接到 Xapi 样式的 URL,例如https://192.168.1.45/console?uuid=e82eeea4-4d88-d31a-aabd-c4207ca6c24d使用普通的 vnc 客户端?

Remmina 似乎直接与主机崩溃,并且尝试使用socat代理也会关闭连接。

KRDC 和 TigerVNC 感到困惑,Vinagre 给出错误,Remmina 崩溃或挂起。

文档显示它是一个非标准的 https 代理,我想知道是否有一个内置此代理支持的 Linux VNC 客户端,或者我可以运行命令来直接进行 http 连接?

proxy
  • 1 个回答
  • 25 Views
Martin Hope
YaBCK
Asked: 2023-11-17 20:57:43 +0800 CST

内部服务器错误 - ProxyPass 和 ProxyReseverse (Apache2)

  • 5

我正在尝试设置 ProxyPass 和 ProxyReverse,以便我可以在两个不同的服务器之间共享域。

希望实现:

域名:https: //example.com

服务器A: https: //example.com/quotes

服务器B:https: //testing.com/quotes

当我在 中设置代理时VirtualHost,出现 500 内部服务器错误。

站点启用示例:

 <VirtualHost _default_:443>
        Protocols h2 h2c http/1.1

        SSLEngine on
        SSLProtocol +TLSv1.1 +TLSv1.2
        SSLCertificateFile ../../certificate.crt
        SSLCertificateKeyFile ../../certificate.key
        SSLCACertificateFile ../../certificate.ca-bundle

        ProxyRequests Off

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>

        <Directory /usr/lib/cgi-bin>
            SSLOptions +StdEnvVars
        </Directory>

        <Proxy *>
          Require all granted
        </Proxy>

        ProxyPass /quotes https://testing.com/quotes
        ProxyPassReverse /quotes https://testing.com/quotes
    
        ErrorLog syslog
        LogLevel emerg
</VirtualHost>

我有什么遗漏的吗?

proxy
  • 1 个回答
  • 34 Views
Martin Hope
user828896
Asked: 2022-11-10 18:38:36 +0800 CST

有多少客户端 PC 可以通过只有一个公共 IPv4 地址的代理访问互联网?

  • 5

如果我有一台具有静态公共 IPv4 198.51.100.138 的代理服务器,它可以访问 interent。

本地网络中有多少台客户端PC 可以通过代理服务器访问Internet?

proxy
  • 2 个回答
  • 59 Views
Martin Hope
Masood Lapeh
Asked: 2022-10-19 08:34:31 +0800 CST

iptables 与 socat 的作用是什么?

  • 6

下面的iptables等价物是什么?

socat TCP-LISTEN:8080 TCP:some-random-host-in-another-network.com:80

现在多个客户端可以连接到这个中间主机的8080端口来实际访问some-random-host-in-another-network.com:80。我想看看它是否可以改善延迟和吞吐量。

proxy iptables
  • 1 个回答
  • 69 Views
Martin Hope
birdy90
Asked: 2022-04-01 23:49:42 +0800 CST

如何使用 ssl 将 nginx + proxy_pass 传递到 docker 容器?

  • 0

我想在我的服务器上为多个站点提供服务。我想将每个站点包装为 docker-compose build,每个站点都有自己的 nginx,它们侦听一个端口

我有一个主机名为 site1.com 的网站。它的 docker compose 暴露了 81 端口:

...
services:
  web:
    image: nginx
    ...
    ports:
      - '81:443'
    ...
...

客户端 nginx(容器内)监听 443 上的所有内容并拥有所有 ssl 设置

server {
        listen 443 ssl;

        ssl_certificate /etc/letsencrypt/fullchain1.pem;
        ssl_certificate_key /etc/letsencrypt/privkey1.pem;
    
        # ...
        # and everything else
}

这里是主机 nginx,它只是根据 server_name 从端口 80 传递到 81:

server {
        listen 80;
        listen [::]:80;

        server_name site1.com;

        location / {
                proxy_pass https://localhost:81;
        }
}

现在它正在工作。但它是不安全的。所以我尝试添加443转发。

server {
        listen 443;
        listen [::]:443;
        server_name bederdinov.me;

        location / {
                proxy_pass https://localhost:81;
        }
}

Nginx 重启很好,但是当我去的时候我https://site1.com得到了一个ERR_SSL_PROTOCOL_ERROR

这似乎很明显 - 主机 nginx 正在尝试使用 ssl 服务请求,但只有 docker 客户端 nginx 知道如何做到这一点

我如何告诉主机 nginx,它不必做任何事情,只需将所有工作传递给客户端 nginx?或者我可以使用其他服务器软件来完成这项任务?

proxy ssl nginx https docker
  • 1 个回答
  • 2441 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve