Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Jenkins configuration method and socks agent

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report