Skip to content

Install Proxychains forcing TCP connection to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy.

License

Notifications You must be signed in to change notification settings

buluma/ansible-role-proxychains

Ansible role proxychains

Install Proxychains forcing TCP connection to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true
  vars:
    dynamic_chain: true
    chain_len: 2
    tcp_read_time_out: 16000
    tcp_connect_time_out: 10000

  pre_tasks:
    - name: Update apt cache.
      apt: update_cache=yes cache_valid_time=600
      when: ansible_os_family == 'Debian'
      changed_when: false
  tasks:
    - name: "Include buluma.python_pip"
      ansible.builtin.include_role:
        name: "buluma.python_pip"
    - name: "Include buluma.epel"
      ansible.builtin.include_role:
        name: "buluma.epel"
    - name: "Include buluma.pip"
      ansible.builtin.include_role:
        name: "buluma.pip"
    - name: "Include buluma.proxychains"
      ansible.builtin.include_role:
        name: "buluma.proxychains"

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap

Also see a full explanation and example on how to use these roles.

The default values for the variables are set in defaults/main.yml:

---
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#

# Dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
dynamic_chain: false

# Strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
strict_chain: false

# Round Robin - Each connection will be done via chained proxies
# of chain_len length
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped).
# the start of the current proxy chain is the proxy after the last
# proxy in the previously invoked proxy chain.
# if the end of the proxy chain is reached while looking for proxies
# start at the beginning again.
# These semantics are not guaranteed in a multithreaded environment.
round_robin_chain: false

# Random - Each connection will be done via random proxy
# (or proxy chain, see  chain_len) from the list.
# this option is good to test your IDS :)
random_chain: false

# Make sense only if random_chain or round_robin_chain
# chain_len = 2

# Quiet mode (false output from library)
# quiet_mode

# Set timeouts in milliseconds
tcp_read_time_out: 15000
tcp_connect_time_out: 8000

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version
buluma.python_pip Ansible Molecule Version
buluma.epel Ansible Molecule Version
buluma.pip Ansible Molecule Version

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles:

dependencies

This role has been tested on these container images:

container tags
Ubuntu focal, bionic, jammy
Debian all
EL 8
Fedora all

The minimum version of Ansible required is 2.1, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub

Role History

Apache-2.0

Shadow Walker

About

Install Proxychains forcing TCP connection to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published