Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Jenkins configuration method and socks agent

Shulou Source: shulou.com Published: 2022-06-02 07:53:59 09月18日 Update

This article mainly explains "the configuration method of jenkins and socks agent". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn "jenkins configuration method and socks agent"!

First of all, jenkins-related operations need to configure the agent, otherwise it is very slow.

1. Implementation of socks proxy through proxychains tool

Based on the installation and configuration of shadowsocks

Vim / etc/shadowsocks.json {"server": "*. *", "server_port": "12345", "local_address": "127.0.0.1", "local_port": "6666", "password": "service_password", "method": "aes-256-cfb", "timeout": "300", "workers": "1"}

Install via apt-get install proxychains and configure vim / etc/proxychains.conf

Socks5 127.0.0.1 6666

This implements the proxy through socks5, but it is not very convenient to use, proxychains curl-I www.google.com, that is, it can be accessed through the proxy with a prefix.

two。 Implementation of http proxy through privoxy

Apt-get install privoxyvim / etc/privoxy/configforward-socks5t / 127.0.0.1:6666. Other configurations can remain unchanged, listen-address localhost:8118, indicating that privoxy listens on 8118. Systemctl restart privoxy.serivcesystemctl enable privoxy.serivce

The simple implementation can be configured in / etc/profile as follows

# temporary agent

Export http_proxy= http://127.0.0.1:6666/

Export https_proxy= https://127.0.0.1:6666/

Source / etc/profile

Then use: curl-I www.google.com to see if it is 200ok

If you want to disable the agent:

# deactivate the agent

Export http_proxy=''

Export https_proxy=''

Or add automatic configuration as follows

Vim / etc/profile.d/vm-proxy.shfunction vm-proxy-on {export no_proxy= "127.0.0.1 unset http_proxy; unset https_proxy vm-proxy-off () {localdomain.com"; export http_proxy='127.0.0.1:8118'; export https_proxy=$http_proxy; echo 'HTTP proxy started.'} export-f vm-proxy-on# the second way to declare the function Echo 'HTTP proxy stopped.'} export-f vm-proxy-off#source script chmod + x / etc/profile.d/vm-proxy.shsource / etc/profile.d/vm-proxy.sh

At this point, it is very convenient to enable or disable the agent.

Vm-proxy-on

Echo $https_proxy

Vm-proxy-off

At this point, I believe you have a deeper understanding of the "jenkins configuration method and socks agent". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Agents configurations methods content learning practical deeper interests functions prefixes practicality practical tools easy to operate methods more friends websites scripts channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MySQL Xiaomi macOS Shulou Technology