當前位置:首頁 » 操作系統 » linuxsquid代理

linuxsquid代理

發布時間: 2023-02-26 13:50:36

A. 如何在linux下配置socks5代理

.採用Danted最新穩定版本1.4.0編譯安裝。
2.自動識別系統IP(默認排除192.168.0.*,
10.0.0.*,127.0.0.*),檢測多Ip時,進行互動式選擇Ip配置(直接回車則全部配置)。
3.
採用Pam用戶認證,認證不需要添加系統用戶(默認添加進程用戶sock),刪除、添加用戶方便,安全。
4.sock5運行狀態查看。
5.
系統啟動後自動載入。
6.認證方式可選:無用戶名密碼,系統用戶名密碼,Pam用戶名密碼
7.
完美支持Centos/Debian,自動識別系統進行安裝配置。
8.
自定義對連接客戶端認證方式,支持設置某些IP/IP段無需認證即可連接。

******安裝用說明

1.下載

wget--no-check-certificate
https://raw.github.com/Lozy/danted/master/install.sh-O
install.sh

2.[可選]修改
默認參數,DEFAULT_PORT為默認埠,DEFAULT_USERPAM用戶名,DEFAULT_PAWDPAM用戶對應密碼MASTER_IP
為免認證白名單(域名,IP可選:如默認的buyvm.info或者具體Ip8.8.8.8/32)
3.修改後,執行

bashinstall.sh

4.若運行結束後顯示DanteServer
InstallSuccessfuly!則表明成功。
若顯示DanteServerInstallFailed!
則表明安裝失敗,求留言反饋操作系統+具體問題。

******安裝後使用說明

1.命令參數/etc/init.d/danted
{start|stop|restart|status|add|del}
2.重啟sock5/etc/init.d/dantedrestart或者
servicedantedrestart
3.關閉sock5/etc/init.d/dantedstop或者servicedanted
stop
4.開啟sock5/etc/init.d/dantedstart或者servicedantedstart
5.
查看sock5狀態/etc/init.d/dantedstatus或者servicedantedstatus
6.添加SOCK5
PAM用戶/修改密碼/etc/init.d/dantedadd用戶名密碼
7.刪除SOCK5PAM用戶/etc/init.d/danted
del用戶名
8.配置文件路徑/etc/danted/conf/
9.日誌記錄路徑/var/log/danted.*.log
10.
danted幫助命令danted--help

******使用注意事項

1.
絕大部分瀏覽器(除了Opera)都不支持帶密碼認證的Socks5,所以使用電腦需要安裝proxifier/proxycap等軟體做驗證處理。
2.
如果是固定IP/Ip段可以修改配置文件,設置白名單訪問
進入/etc/danted/conf/找到配置文件
修改第一個client
pass{}模塊下的from:Master_IP/32to:0.0.0.0/0.把Master_IP/32
修改為需要使用代理的Ip段/IP地址如114.114.114.0/24或者5.5.5.5/32.多個訪問源,請復制多個clientpass{}
模塊。重啟Danted進程servicedantedrestart

更詳細WIKI說明
https://github.com/Lozy/danted/blob/master/README.md
項目託管地址
https://github.com/Lozy/danted
說明下,這個支持TCP及UDP的代理伺服器,一鍵安裝,簡單方便……

B. 在Linux中可以實現代理伺服器功能的軟體是什麼

Linux中實現代理伺服器功能最常用的軟體為squid,下面是源代碼包安裝步驟:

1.從http://www.squid-cache.org下載squid-2.2.STABLE4-src.tar.gz

2.將該文件拷貝到/usr/local目錄

cpsquid-2.2.STABLE4-src.tar.gz/usr/local

3.解開該文件

tarxvzf
squid-2.2.STABLE4-src.tar.gz
#為了方便使用將目錄更名為squid
mvsquid-2.2.STABLE4squid

4.進入squid目錄

cdsquid

5.執行編譯

./configure
#系統默認安裝目錄為/usr/local/squid
/configure-prefix=/directory/you/want
#指定安裝目錄

6.執行

makeall

7.執行安裝

makeinstall

8.安裝結束後,Squid的可執行文件在安裝目錄的bin子目錄下,配置文件在etc子目錄下。

C. 關於linux下有哪些代理伺服器

Linux中實現代理伺服器功能最常用的軟體為squid,下面是源代碼包安裝步驟: 1.從http://www.squid-cache.org下載squid-2.2.STABLE4-src.tar.gz 2.將該文件拷貝到/usr/local目錄

D. 簡述Linux Squid代理伺服器的主要作用

squid is a high-performance proxy caching server for web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, squid handles all requests in a single, non-blocking, I/O-driven process.

squid keeps meta data and especially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests.

squid supports SSL, extensive access controls, and full request logging. By using the lightweight Internet Cache Protocol, squid caches can be arranged in a hierarchy or mesh for additional bandwidth savings.

squid consists of a main server program squid, a Domain Name System lookup program dnsserver, some optional programs for rewriting requests and performing authentication, and some management and client tools. When squid starts up, it spawns a configurable number of dnsserver processes, each of which can perform a single, blocking Domain Name System (DNS) lookup. This reces the amount of time the cache waits for DNS lookups.

E. linux下開啟防火牆後使用squid反向代理訪問不了,關閉防火牆則可以正常訪問。

1、在squid.conf裡面查看埠號,如http_port 3128
2、打開防火牆相應的埠
1)# vi /etc/sysconfig/iptables ← 編輯防火牆配置文件
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3128 -j ACCEPT ← 添加這一行,開放3128號埠,允許squid

2)# /etc/rc.d/init.d/iptables restart ← 重新啟動防火牆,使設置生效

F. 如何在Linux上用Squid搭建代理伺服器

安裝步驟:
./configure --prefix=/usr/local/squid
make all
sudo make install(因為要拷貝到系統目錄,需要root許可權,所以sudo了,你也可以root登錄執行,我是Ubuntu的系統,所以用sudo,有root許可權就行)
檢查配置文件:
sudo vi /usr/local/squid/etc/squid.conf
配置項1:
# Squid normally listens to port 3128
http_port 3128
配置項2:
acl localnet src 192.168.0.0/16
http_access allow localnet
配置項3:
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /usr/local/squid/var/cache/squid 100 16 128
cache_mem 32 MB (這一條必須配置)
否則你就會遭遇報錯: 2013/10/12 16:16:55 kid1| WARNING cache_mem is larger than total disk cache space!
安裝好了以後,系統中新建了一個用戶squid,在組中一查,發現屬於nobody組的:
cat /etc/passwd|grep squid
cat /etc/group|grep 65534
安裝squid的所在目錄是:/usr/local/squid
我閑得沒事干,直接改了所屬用戶為squid:nobody
sudo chown -Rf squid:nobody /usr/local/squid
建立cache的時候,對下面目錄需要nobody用戶許可權,這個是網上沒有說的很清楚的地方,折騰了我半天:
sudo chown -Rf nobody /usr/local/squid/var/cache/
sudo chown -Rf nobody /usr/local/squid/var/logs/

熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:593
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:888
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:582
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:765
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:684
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:1013
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:255
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:114
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:806
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:713