Giter VIP home page Giter VIP logo

geonode-free-proxylist's Introduction

Actions Status

NAME

Geonode::Free::ProxyList - Get Free Geonode Proxies by using some filters

VERSION

Version 0.0.5

SYNOPSIS

Get Geonode's free proxy list and apply some filters. You can later choose them by random.

my $proxy_list = Geonode::Free::ProxyList->new();

$list->set_filter_google('true');
$list->set_filter_port(3128);
$list->set_filter_limit(200);

$list->add_proxies; # Add proxies to the list for current filters    

$list->set_filter_google('false');
$list->set_filter_port();  # reset filter
$list->set_filter_limit(); # reset filter
$list->set_filter_protocol_list( [ 'socks4', 'socks5' ] );
$list->set_filter_speed('fast');

$list->add_proxies; # Add proxies to the list for current filters

# List of proxies is shuffled

my $some_proxy = $list->get_next;  # Repeats when list is exhausted
my $other_proxy = $list->get_next; # Repeats when list is exhausted

my $random_proxy = $list->get_random_proxy;  # Can repeat

$some_proxy->get_methods();  # [ 'http', 'socks5' ]

Geonode::Free::Proxy::prefer_socks(); # Will use socks for url, if available

$some_proxy->get_url(); # 'socks://127.0.0.1:3128';

Geonode::Free::Proxy::prefer_http(); # Will use http url, if available

$some_proxy->get_url(); # 'http://127.0.0.1:3128';

$some_proxy->can_use_http();  # 1
$some_proxy->can_use_socks(); # 1

$other_proxy->can_use_socks(); # q()
$other_proxy->can_use_http();  # 1

Geonode::Free::Proxy::prefer_socks(); # Will use socks for url, if available

$some_proxy->get_url(); # 'http://foo.bar.proxy:1234';

Geonode::Free::ProxyList SUBROUTINES/METHODS

new

Instantiate Geonode::Free::ProxyList object

reset_proxy_list

Clears proxy list

reset_filters

Reset filtering options

set_filter_country

Set country filter. Requires a two character uppercase string or undef to reset the filter

set_filter_google

Set google filter. Allowed values are 'true'/'false'. You can use undef to reset the filter

set_filter_port

Set port filter. Allowed values are numbers that does not start by zero. You can use undef to reset the filter

set_filter_protocol_list

Set protocol list filter. Allowed values are http, https, socks4, socks5. You can use an scalar or a list of values. By using undef you can reset the filter

set_filter_anonymity_list

Set anonimity list filter. Allowed values are http, https, socks4, socks5. You can use an scalar or a list of values. By using undef you can reset the filter

set_filter_speed

Set speed filter. Allowed values are: fast, medium, slow. You can use undef to reset the filter

set_filter_org

Set organization filter. Requires some non empty string. You can use undef to reset the filter

set_filter_uptime

Set uptime filter. Allowed values are: 0-100 in 10% increments. You can use undef to reset the filter

set_filter_last_checked

Set last checked filter. Allowed values are: 1-9 and 20-60 in 10% increments. You can use undef to reset the filter

set_filter_limit

Set speed filter. Allowed values are numbers greater than 0. You can use undef to reset the filter

set_env_proxy

Use proxy based on environment variables

See: https://metacpan.org/pod/LWP::UserAgent#env\_proxy

Example:

$proxy_list->set_env_proxy();

set_proxy

Exposes LWP::UserAgent's proxy method to configure proxy server

See: https://metacpan.org/pod/LWP::UserAgent#proxy

Example:

$proxy_list->proxy(['http', 'ftp'], 'http://proxy.sn.no:8001/');

set_timeout

Set petition timeout. Exposes LWP::UserAgent's timeout method

See: https://metacpan.org/pod/LWP::UserAgent#timeout

Example:

$proxy_list->timeout(10);

add_proxies

Add proxy list according to stored filters

get_all_proxies

Return the whole proxy list

get_random_proxy

Returns a proxy from the list at random (with repetition)

get_next

Returns next proxy from the shuffled list (no repetition until list is exhausted)

Geonode::Free::Proxy SUBROUTINES/METHODS

new

Instantiate Geonode::Free::Proxy object

prefer_socks

Sets preferred method to socks. This is used when getting the full proxy url.

Preferred method is set up *globally*.

prefer_http

Sets preferred method to http. This is used when getting the full proxy url.

Preferred method is set up *globally*.

get_preferred_method

Gets preferred method

get_id

Gets proxy id

get_host

Gets host

get_port

Gets port

get_methods

Gets methods

can_use_socks

Returns truthy if proxy can use socks method

can_use_http

Returns truthy if proxy can use http method

get_url

Gets proxy url

AUTHOR

Julio de Castro, <julio.dcs at gmail.com>

BUGS

Please report any bugs or feature requests to bug-geonode-free-proxylist at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geonode-Free-ProxyList.

I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Geonode::Free::ProxyList

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2021 by Julio de Castro.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

geonode-free-proxylist's People

Contributors

dcsjulio avatar

Watchers

 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.