Tidy up
This commit is contained in:
parent
449f6459b3
commit
6cc9d78057
|
@ -0,0 +1,3 @@
|
|||
/example/proxies.txt
|
||||
/example/socks.list
|
||||
/example/socksold.list
|
|
@ -1,14 +1,17 @@
|
|||
## Prox5
|
||||
|
||||
[![GoDoc](https://godoc.org/git.tcp.direct/kayos/Prox5?status.svg)](https://godoc.org/git.tcp.direct/kayos/Prox5) [![Go Report Card](https://goreportcard.com/badge/github.com/yunginnanet/Prox5)](https://goreportcard.com/report/github.com/yunginnanet/Prox5) [![IRC](https://img.shields.io/badge/ircd.chat-%23tcpdirect-blue.svg)](ircs://ircd.chat:6697/#tcpdirect)
|
||||
|
||||
### SOCKS5/4/4a validating proxy pool
|
||||
|
||||
![Demo](./Prox5.gif)
|
||||
|
||||
This package is for managing and accessing thousands upon thousands of arbitrary SOCKS proxies.
|
||||
This package is for managing and accessing thousands upon thousands of arbitrary SOCKS proxies.
|
||||
|
||||
It also has a SOCKS5 server that dials out from ***?????*** Every time you ***?????***.
|
||||
|
||||
Pipe it a file filled with SOCKS proxies (host:port per line) and it will validate them continously while automatically weeding out the invalid ones.
|
||||
Pipe it a file filled with SOCKS proxies (host:port per line) and it will validate them continously while automatically
|
||||
weeding out the invalid ones.
|
||||
|
||||
This project is in development.
|
||||
|
||||
|
|
6
defs.go
6
defs.go
|
@ -206,10 +206,10 @@ func NewDefaultSwamp() *Swamp {
|
|||
|
||||
swampopt: defOpt(),
|
||||
|
||||
quit: make(chan bool),
|
||||
quit: make(chan bool),
|
||||
conductor: make(chan bool),
|
||||
mu: &sync.RWMutex{},
|
||||
Status: atomic.Value{},
|
||||
mu: &sync.RWMutex{},
|
||||
Status: atomic.Value{},
|
||||
}
|
||||
|
||||
s.Status.Store(New)
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
var swamp *Prox5.Swamp
|
||||
var quit chan bool
|
||||
var t *tty.TTY
|
||||
|
||||
func init() {
|
||||
quit = make(chan bool)
|
||||
|
@ -50,7 +51,8 @@ func get(ver string) {
|
|||
}
|
||||
|
||||
func watchKeyPresses() {
|
||||
t, err := tty.Open()
|
||||
var err error
|
||||
t, err = tty.Open()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -104,7 +106,6 @@ func watchKeyPresses() {
|
|||
}
|
||||
}
|
||||
|
||||
t.Close()
|
||||
quit <- true
|
||||
return
|
||||
}
|
||||
|
@ -112,6 +113,10 @@ func watchKeyPresses() {
|
|||
func main() {
|
||||
go watchKeyPresses()
|
||||
|
||||
defer func(t *tty.TTY) {
|
||||
_ = t.Close()
|
||||
}(t)
|
||||
|
||||
go func() {
|
||||
for {
|
||||
fmt.Printf("4: %d, 4a: %d, 5: %d \n", swamp.Stats.Valid4, swamp.Stats.Valid4a, swamp.Stats.Valid5)
|
||||
|
|
|
@ -47,12 +47,12 @@ func (s *Swamp) SetMaxWorkers(num int) {
|
|||
s.pool.Tune(num)
|
||||
}
|
||||
|
||||
// EnableRecycling disables recycling used proxies back into the pending channel for revalidation after dispensed.
|
||||
// EnableRecycling enables recycling used proxies back into the pending channel for revalidation after dispensed.
|
||||
func (s *Swamp) EnableRecycling() {
|
||||
s.swampopt.recycle.Store(true)
|
||||
}
|
||||
|
||||
// DisableRecycling enables recycling used proxies back into the pending channel for revalidation after dispensed.
|
||||
// DisableRecycling disables recycling used proxies back into the pending channel for revalidation after dispensed.
|
||||
func (s *Swamp) DisableRecycling() {
|
||||
s.swampopt.recycle.Store(false)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue