NAME

Geonode::Free::Proxy - Geonode's Proxy Object returned by Geonode::Free::ProxyList

Note: this a companion module for Geonode::Free::ProxyList

VERSION

Version 0.0.1

SYNOPSIS

Geonode's Proxy Object returned by Geonode::Free::ProxyList

my $some_proxy = Geonode::Free::Proxy->new(
    'some-id',
    '127.0.0.1',
    3128,
    [ 'http', 'socks5' ]
);

$some_proxy->get_host();    # '127.0.0.1'
$some_proxy->get_port();    # 3128
$some_proxy->get_methods(); # [ 'http', 'socks5' ]

my $other_proxy = Geonode::Free::Proxy->new(
    'some-id',
    '127.0.0.1',
    3128,
    [ 'http', 'socks5' ]
);

Geonode::Free::Proxy::prefer_socks();
$some_proxy->get_url(); # 'socks://127.0.0.1:3128';

Geonode::Free::Proxy::prefer_http();
$other_proxy->get_url(); # 'http://127.0.0.1:3128';

my $http_proxy = Geonode::Free::Proxy->new(
    'some-id',
    '127.0.0.1',
    3128,
    [ 'http' ]
);

$http_proxy->can_use_http();  # 1;
$http_proxy->can_use_socks(); # 0;

Geonode::Free::Proxy::prefer_socks();
$http_proxy->get_url(); # 'http://127.0.0.1:3128';

SUBROUTINES/METHODS

new

Instantiate Geonode::Free::Proxy object (id, host, port, methods)

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 host

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::Proxy

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)