Git Product home page Git Product logo

rotateproxy's Introduction

rotateproxy

利用 fofa 搜索 socks5 开放代理进行代理池轮切的工具

特性

  • 支持认证
  • 代理列表优选策略:随机、或延时前多少位随机

帮助

.\rotateproxy.exe -h
Usage of rotateproxy.exe:
  -check string
        check url (default "https://www.google.com")
  -checkWords string
        words in check url (default "Copyright The Closure Library Authors")
  -email string
        email address
  -l string
        listen address (default ":8899")
  -page int
        the page count you want to crawl (default 5)
  -pass string
        authentication password
  -proxy string
        proxy
  -region int
        0: all 1: cannot bypass gfw 2: bypass gfw
  -rule string
        search rule (default "protocol==\"socks5\" && \"Version:5 Method:No Authentication(0x00)\" && after=\"2022-02-01\" && country=\"CN\"")
  -strategy int
        0: random, 1: Select the one with the shortest timeout (default 1)
  -token string
        token
  -user string
        authentication username

参数说明

  • -check-checkWords: 如果你希望你找出来的代理能够访问某个特定网站,可以使用 -check-checkWords,checkWords 为一串字符,用来保证确定是访问的该网站,比如 -check "https://www.google.com" -checkWords "Copyright The Closure Library Authors",目的就是找出来的代理能够访问 https://www.google.com,并且返回内容中含有 Copyright The Closure Library Authors
  • -email-token: fofa 的邮箱和 token
  • -l: 本服务的 socks5 监听地址
  • -page: fofa 结果默认爬取多少页(每页固定爬取 100 条)
  • -user-pass: 本服务的 socks5 用户名密码认证
  • -proxy: 如果提供,将使用该 proxy 来访问 fofa 获取代理地址
  • -region: 用来筛选是否能访问谷歌

安装

go get -u github.com/akkuman/rotateproxy/cmd/...

或者到发布页面进行下载

curl -L -o rotateproxy 'https://github.com/akkuman/rotateproxy/releases/latest/download/rotateproxy-linux-amd64'
chmod +x ./rotateproxy

安装为 linux 服务(感谢 @Rvn0xsy 提供 PR

  1. 下载相关文件
curl -L -o /usr/local/bin/rotateproxy 'https://github.com/akkuman/rotateproxy/releases/latest/download/rotateproxy-linux-amd64'
chmod +x /usr/local/bin/rotateproxy
curl -L -o /usr/lib/systemd/system/rotateproxy.service 'https://raw.githubusercontent.com/akkuman/rotateproxy/master/rotateproxy.service.example'
  1. 查看 rotateproxy.service.example 文件示例,将 /usr/lib/systemd/system/rotateproxy.service 文件中的 ExecStart 的命令替换为你自己的命令

  2. 启动服务

# 开启服务
service rotateproxy start
# 关闭服务
service rotateproxy stop
# 重启服务
service rotateproxy restart
# 设置开机自启动
systemctl enable rotateproxy.service
  1. 使用
curl --proxy "socks5://127.0.0.1:8899" https://example.com

效果展示

开发

注意

  1. 该项目为了交叉编译方便,采用的 cgo-free 的 sqlite3 库,该库默认可能开启了 SQLITE_FCNTL_PERSIST_WAL,导致就算 Close 了数据库连接依旧不会删除 wal 文件,所以可能你会在 .db 旁边看到 -shm 和 -wal 文件,如果需要共享该数据库,请将这三个文件一并打包发送

rotateproxy's People

Contributors

akkuman avatar izj007 avatar mark0smith avatar rvn0xsy avatar yywing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rotateproxy's Issues

存在连接不稳定的问题

image

./rotateproxy -email "[email protected]" -token 6453d19 -region 1 -page 1
使用的这个命令
在连接socks5代理的时候,存在不少连接失败的的问题,会导致没办法正常使用,是不是验证存活的时候需要使用更加完善的方法呢

  • 感谢您分享的此工具

请求商务推广合作

作者您好,我们也是一家专业做IP代理的服务商,极速HTTP,我们注册认证会送10000IP(可以帮助您的学者适当薅羊毛试用 :) 。想跟您谈谈是否能够达成商业推广上的合作。如果您,有意愿的话,可以联系我,微信:13982004324 谢谢(如果没有意愿的话,抱歉,打扰了)

使用报错,socks握手失败

[!] socks handshake with downstream failed: method forbidden
[!] socks handshake with downstream failed: method forbidden
[!] socks handshake with downstream failed: method forbidden
[!] socks handshake with downstream failed: method forbidden
[!] socks handshake with downstream failed: method forbidden
image

代理连接异常

[!] transport error: [!] copyBuffer: runtime error: invalid memory address or nil pointer dereference
[*] close connection: runtime error: invalid memory address or nil pointer dereference

mac使用报错

可以正常抓取代理,curl --socks5 127.0.0.1:5555 cip.cc使用代理时报错

[] use 43.240.75.131
[!] transport error: [!] copyBuffer: runtime error: invalid memory address or nil pointer dereference
[
] close connection: runtime error: invalid memory address or nil pointer dereference

1

Error: database is locked (5) (SQLITE_BUSY)什么问题

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.