Coder Social home page Coder Social logo

xiaohongqi99 / single-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bincooo/single-proxy

0.0 0.0 0.0 63 KB

代理http[s],可配置proxy。chatgpt、claude、gemini

Home Page: https://bincooo-single-proxy.hf.space

Go 98.10% Dockerfile 1.90%

single-proxy's Introduction

简单代理服务器

仿 nginx 代理服务,支持本地代理、ja3、 websocket

默认配置文件已提供了claude镜像代理、ChatGPT API代理、NewBing API代理、gptscopilot代理

代理路径如下:http://127.0.0.1:8080 + 下方代理路径

# NewBing 代理
/copilot/turing/conversation/create
/copilot/sydney/ChatHub

/copilot/codex/plugins/available/get
/copilot/images/kblob

# gptscopilot 代理
/gpts/proxies/v1/chat/completions

# gemini 代理
/google/v1/*

# ChatGPT 代理
/proxies/v1/*

# claude 代理
/claude
/claude/api*

编译

GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o server -trimpath

配置

config.yaml 配置

#本地代理
proxies: http://127.0.0.1:7890
#本地代理池请求接口
proxies-pool: http://xxxx.com/get
# 服务端口
port: 8080
# 目标代理地址
mappers:
  - addr: https://xxx.com
    #是否开启ja3
    ja3: true
    routes:
      # 转发路径
      - path: /gpts/proxies/v1/chat/(completions)
        # 重写路径 (支持正则写法)
        rewrite: /api/chat/$1
        # 本地代理 auto为代理池模式,或填写代理地址http://xxx.com
        proxies: auto
        # 前置 request、response 设置器
        action:
          - '{{$var := req_getHeader "Authorization"}}
            {{if contains $var "Bearer "}}
              {{$var = index (split $var " ") 1}}
            {{end}}
            {{$var = append "__sid__=" $var}}
            {{req_setHeader "cookie" $var}}
            {{req_setHeader "origin" "https://gptscopilot.ai"}}
            {{req_setHeader "referer" "https://gptscopilot.ai/gpts"}}
            {{req_delHeader "Authorization"}}'

vercel

一键部署,点这里 => Deploy with Vercel

建议Fork到自己的github上,修改自己的config.yaml文件。并在vercel上的Environment Variables配置CONFIG

本地代理池

monkey-soft/Scrapy_IPProxyPool

jhao104/proxy_pool

single-proxy's People

Contributors

bincooo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.