LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2022, 05:48 AM   #1
taiwbi
LQ Newbie
 
Registered: Oct 2022
Posts: 2

Rep: Reputation: 0
Question How can I set socks5 proxy on apt ?


Internet in my region is so restricted and many websites even some apt repositories are blocked.
I have a shadowsocks server and I use
Code:
ss-local
to create a local socks5 proxy. I use foxyproxy in my browser to connect to local socks5 proxy and access the internet.
But how can I configure apt to use this local socks5 proxy? It's about one month that I can't even run a simple
Code:
apt update
.

I'm using Ubuntu 22.04.1 LTS.
 
Old 10-10-2022, 07:29 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
From the apt-transport-http man page, it seems you'd can add something like
Code:
Acquire::http::proxy "socks5h://127.0.0.1:9050";
to a file under /etc/apt/apt.conf.d/

Add and/or replace with https as needed.

Evo2.

Last edited by evo2; 10-10-2022 at 07:31 PM. Reason: https
 
2 members found this post helpful.
Old 10-11-2022, 01:09 AM   #3
taiwbi
LQ Newbie
 
Registered: Oct 2022
Posts: 2

Original Poster
Rep: Reputation: 0
Yes thank you. That was it. Thank you so much.
I didn't know even there's a man page for apt-transport-http
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I've set up a hotspot in linux,how to forward the network traffic to a socks5 proxy? MarkZar Linux - Networking 1 12-26-2014 06:15 AM
socks5 proxy with bash? Dr_Death_UAE Linux - General 1 09-20-2009 10:00 AM
Programm that works simultaneously as a socks5 and http proxy axelfc Linux - Software 0 01-25-2006 12:26 PM
I want to download ftp-site files via wget and socks5 proxy server. jiawj Red Hat 2 10-28-2004 03:32 PM
"socks5" -> "http" proxy protocol, or ssh tunnel to sock5 ? I'm beyond http p vmicho Linux - Networking 2 12-16-2003 05:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration