标签: proxy

开发人员Web代理

我需要一个代理Web开发调试.最好是独立的东西,所以我可以在IE和Firefox上使用它.我到目前为止使用的是CharlesProxy,但我希望找到一个免费的.有谁知道一个好的?

proxy

9
推荐指数
2
解决办法
5696
查看次数

在Twisted中将HTTP代理转换为HTTPS代理

最近我一直在使用扭曲的HTTP代理.经过多次反复试验后,我想我终于有了一些工作.我想知道的是,如果有可能,我是否可以扩展此代理以便能够处理HTTPS页面?这是我到目前为止所得到的:

from twisted.internet import reactor
from twisted.web import http
from twisted.web.proxy import Proxy, ProxyRequest, ProxyClientFactory, ProxyClient



class HTTPProxyClient(ProxyClient):
    def handleHeader(self, key, value):
        print "%s : %s" % (key, value)
        ProxyClient.handleHeader(self, key, value)

    def handleResponsePart(self, buffer):
        print buffer
        ProxyClient.handleResponsePart(self, buffer)

class HTTPProxyFactory(ProxyClientFactory):
    protocol = HTTPProxyClient

class HTTPProxyRequest(ProxyRequest):
    protocols = {'http' : HTTPProxyFactory}

    def process(self):
        print self.method
        for k,v in self.requestHeaders.getAllRawHeaders():
            print "%s : %s" % (k,v)
        print "\n \n"

        ProxyRequest.process(self)

class HTTPProxy(Proxy):

    requestFactory = HTTPProxyRequest


factory = http.HTTPFactory()
factory.protocol = HTTPProxy …
Run Code Online (Sandbox Code Playgroud)

python https proxy http twisted

9
推荐指数
1
解决办法
2万
查看次数

如何设置IIS进程的代理设置?

我通过http代理连接互联网,我在localhost的一些web应用程序需要访问互联网.我在哪里可以为它们设置代理设置?

iis proxy iis-7.5

9
推荐指数
1
解决办法
4万
查看次数

当使用HTTP进行反向代理时,Jetty安全会话cookie

我在Jetty 6前面使用反向代理(Apache).用户使用SSL连接到Apache,Apache通过普通HTTP将一些请求转发给Jetty.我希望Jetty使用安全会话cookie.

人们会认为这将是安装Jetty后人们做的第一件事 - 但我很难让它上班.

我设置Jetty使用安全cookie,如另一个stackoverflow问题中所述.但是,Jetty拒绝使用安全cookie - 我认为这是因为反向代理的连接不是SSL.

我试图说服Jetty它正在根据sonatype.com上的描述处理来自SSL的请求.也就是说,我在Apache中添加了以下内容:

RequestHeader set X-Forwarded-Scheme "https"
Run Code Online (Sandbox Code Playgroud)

在/etc/jetty/jetty.xml中:

<Set name="handler">
  <New id="Handlers" class="org.mortbay.jetty.handler.rewrite.RewriteHandler">
    <Set name="rules">
      <Array type="org.mortbay.jetty.handler.rewrite.Rule">
        <Item>
          <New id="forwardedHttps"
               class="org.mortbay.jetty.handler.rewrite.ForwardedSchemeHeaderRule">
            <Set name="header">X-Forwarded-Scheme</Set>
            <Set name="headerValue">https</Set>
            <Set name="scheme">https</Set>
          </New>
        </Item>
      </Array>
    </Set>

    <Set name="handler">
      <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
        <Set name="handlers">
          <Array type="org.mortbay.jetty.Handler">
            <Item>
              <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
            </Item>
            <Item>
              <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
            </Item>
            <Item>
              <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
            </Item>
          </Array>
        </Set>
      </New>
    </Set>
  </New>
</Set>
Run Code Online (Sandbox Code Playgroud)

仍然没有安全的cookie.有什么建议?

ssl proxy jetty

9
推荐指数
1
解决办法
3824
查看次数

让 Node.js 使用 http_proxy、https_proxy 和 no_proxy 环境变量

我有一个节点服务器,根据最近的一些基础设施更改,我需要确保所有出站请求都通过 Squid 代理,除了 NO_PROXY 环境变量中列出的主机的流量。

设置 HTTP_PROXY、HTTPS_PROXY 和 NO_PROXY 似乎不会影响节点服务器的行为,但我需要一种方法来执行此操作,而无需手动编辑库。我有大约 10 个库可以访问需要尊重这种代理行为的外部服务。

是否有其他方法可以全局设置代理行为,包括尊重 NO_PROXY?

proxy http node.js

9
推荐指数
2
解决办法
2万
查看次数

MITMPROXY 使输出可供人类读取到文件

我的系统:

Ubuntu 16.04
Mitmproxy version 3.0.4
Python version 3.5.2
Run Code Online (Sandbox Code Playgroud)

我已从mitmproxy服务器上的docs.mitmproxy.org成功安装。但现在我很困惑如何将日志 mitmproxy 保存到文件?我尝试使用mitmdump --mode transparent --showhost -p 9001 -w output_file

当我打开时output_file,它不是人类可读的。我阅读了文档并尝试了来自 mitmproxy 的 Github 的脚本,但没有任何线索。

有人知道如何将日志 mitmproxy 保存到文件中,但人类可读吗?
谢谢你!

proxy mitmproxy

9
推荐指数
1
解决办法
5550
查看次数

如何通过 Selenium 在 Chrome 浏览器中使用 Tor

我正在尝试在 Tor 上运行我的 selenium 驱动程序。请注意,该脚本在没有 Tor 的情况下已经运行且没有错误。

这是我到目前为止所做的:

1)我调用了 Tor 框架

import socks
import socket
from stem.util import term    


import stem.process

SOCKS_PORT=7000 

socks.setdefaultproxy(proxy_type=socks.PROXY_TYPE_SOCKS5,
                      addr = "127.0.0.1", 
                      port = SOCKS_PORT)
socket.socket = socks.socksocket

# Perform DNS resolution through the socket
def getaddrinfo(*args):   return [(socket.AF_INET, socket.SOCK_STREAM, 6, '', (args[0], args[1]))]

socket.getaddrinfo = getaddrinfo

def print_bootstrap_lines(line):   
    if "Bootstrapped " in line:
      print(term.format(line, term.Color.GREEN))

tor_process = stem.process.launch_tor_with_config(
    tor_cmd = "C:/Users/my-username\Desktop/Tor Browser/Browser/TorBrowser/Tor//tor.exe" ,
    config = { 'SocksPort': str(SOCKS_PORT),},
    init_msg_handler = print_bootstrap_lines,
)
Run Code Online (Sandbox Code Playgroud)
  1. 在调用了我理解的容器的 Tor 框架之后,我调用了 …

proxy selenium google-chrome tor python-3.x

9
推荐指数
1
解决办法
7021
查看次数

如何让 Firefox 使用代理服务器进行本地主机连接

我有一个 SOCKS 代理将本地机器上的端口 9999 转发到远程开发服务器。我使用与 Firefox 的代理连接,以便我可以访问开发服务器的网络,但我也希望能够将 Firefox 中的本地主机连接转发到远程服务器localhost以连接到在那里运行的各种服务。我已删除localhost并127.0.0.1从“无代理的”设置,它仍然无法正常工作。我如何使它工作?

ssh firefox proxy

9
推荐指数
1
解决办法
8516
查看次数

是否可以使用 Traefik 通过 SSL 代理 PostgreSQL?

动机

尝试使用 Let's Encrypt 通过 SSL 使用 Traefik 代理 PostgreSQL 时,我遇到了一个问题。我做了一些研究,但没有很好的记录,我想确认我的观察并给每个面临这种情况的人留下记录。

配置

我使用最新版本的 PostgreSQL v12 和 Traefik v2。我想使用 Let's Encrypt从->通过 TLS构建纯 TCP 流。tcp://example.com:5432tcp://postgresql:5432

Traefik 服务配置如下:

  version: "3.6"
    
    services:
    
      traefik:
        image: traefik:latest
        restart: unless-stopped
        volumes:
          - "/var/run/docker.sock:/var/run/docker.sock:ro"
          - "./configuration/traefik.toml:/etc/traefik/traefik.toml:ro"
          - "./configuration/dynamic_conf.toml:/etc/traefik/dynamic_conf.toml"
          - "./letsencrypt/acme.json:/acme.json"
    
        networks:
          - backend
        ports:
          - "80:80"
          - "443:443"
          - "5432:5432"
    
    networks:
      backend:
        external: true
Run Code Online (Sandbox Code Playgroud)

使用静态设置:


[entryPoints]
  [entryPoints.web]
    address = ":80"
    [entryPoints.web.http]
      [entryPoints.web.http.redirections.entryPoint]
        to = "websecure"
        scheme = "https"

  [entryPoints.websecure]
    address = ":443"
    [entryPoints.websecure.http]
      [entryPoints.websecure.http.tls] …
Run Code Online (Sandbox Code Playgroud)

postgresql proxy tcp sni traefik

9
推荐指数
1
解决办法
3116
查看次数

Puppeteer Bright Data 代理返回 ERR_NO_SUPPORTED_PROXY 或 CERT 错误

所以我继续使用 Bright Data,注册了一个帐户,并获得了我的 Search Engine Crawler 代理。下面是我的抓取功能:

async function scrape() {
  try {
    const preparePageForTests = async (page) => {

          const userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36';//'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36';

          await page.setUserAgent(userAgent);

          await page.evaluateOnNewDocument(() => {
            Object.defineProperty(navigator, 'webdriver', {
              get: () => false,
            });
          });

          // Pass the Chrome Test.
          await page.evaluateOnNewDocument(() => {
            // We can mock this in as much depth as we need for the …
Run Code Online (Sandbox Code Playgroud)

javascript proxy node.js web-scraping puppeteer

9
推荐指数
1
解决办法
247
查看次数