Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

use a proxy for portage- help needed

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
czo
Tux's lil' helper
Tux's lil' helper
Posts: 107
Joined: Wed Sep 01, 2004 9:06 am
Location: Denmark
Contact:
Contact czo
Website

use a proxy for portage- help needed

  • Quote

Post by czo » Mon Nov 08, 2004 1:22 am

i have a proxy.pac URL and would like to use the proxy when i was emergeing things... is that possible??
Last edited by czo on Mon Nov 08, 2004 2:32 pm, edited 1 time in total.
Top
ep98
Apprentice
Apprentice
User avatar
Posts: 232
Joined: Tue Jul 08, 2003 7:13 pm
Location: Bulgaria
Contact:
Contact ep98
Website

  • Quote

Post by ep98 » Mon Nov 08, 2004 7:00 am

simply add the following lines in your .bashrc

export http_proxy=http://your.proxy.net:3128/
export ftp_proxy=http://your.proxy.net:3128/

3128 can be different for your network, but most ISP uses SQUID, and default SQUID port is 3128
If u cant give advice, dont send the helpless to the HOWTO's way or Google.com way.
Top
czo
Tux's lil' helper
Tux's lil' helper
Posts: 107
Joined: Wed Sep 01, 2004 9:06 am
Location: Denmark
Contact:
Contact czo
Website

  • Quote

Post by czo » Mon Nov 08, 2004 2:17 pm

oki thanks...

> export http proxy=login:password@ip proxy:port
> export ftp proxy=login:password@ip proxy:port

will this effect my hole system or only portage?

and what if i yould like use a pack..??

export pak???? help me please :)
Top
ep98
Apprentice
Apprentice
User avatar
Posts: 232
Joined: Tue Jul 08, 2003 7:13 pm
Location: Bulgaria
Contact:
Contact ep98
Website

  • Quote

Post by ep98 » Mon Nov 08, 2004 3:48 pm

the whole system will be affected, wget, links, elinks, lynx, curl and portage of course, what means with this pack ?
If u cant give advice, dont send the helpless to the HOWTO's way or Google.com way.
Top
czo
Tux's lil' helper
Tux's lil' helper
Posts: 107
Joined: Wed Sep 01, 2004 9:06 am
Location: Denmark
Contact:
Contact czo
Website

  • Quote

Post by czo » Mon Nov 08, 2004 6:53 pm

i have been told:

proxy-server: http://odense.kollegienet.dk/proxy.pac


is it possible to use that??
Top
liber!
Tux's lil' helper
Tux's lil' helper
Posts: 123
Joined: Thu Aug 05, 2004 7:17 pm
Location: EU, Antwerp

  • Quote

Post by liber! » Mon Nov 08, 2004 7:05 pm

I don't know, but afther looking to the contents of the pac file (it's just a text file):

Code: Select all

funnction FindProxyForURL(url, host) { 
	if (url.substring(0, 5) == "http:") { 
		if ( 
			dnsDomainIs(host, ".campusnet.iot.dk") || 
			isInNet( host,"130.225.95.213", "255.255.255.255")
		) 
			return "PROXY proxy.kollegie.dk:3128; DIRECT"; 	 
		if ( 
			isPlainHostName( host) || 
			dnsDomainIs( host, ".ou.dk") ||  
			dnsDomainIs( host, ".sdu.dk") ||  
			dnsDomainIs( host, ".dou.dk") ||  
			dnsDomainIs( host, ".kollegie.dk") ||  
			dnsDomainIs( host, ".kollegienet.dk") || 
			dnsDomainIs( host, "localhost") || 
			isInNet( host, "130.225.128.0", "255.255.224.0") ||
                        isInNet( host, "130.225.160.0", "255.255.252.0") ||
			isInNet( host, "130.226.191.0", "255.255.255.0") || 
			isInNet( host, "130.226.192.0", "255.255.254.0") || 
			isInNet( host, "130.226.194.0", "255.255.255.0") || 
			isInNet( host, "130.225.239.0", "255.255.255.0") || 
			isInNet( host, "130.226.8.0",   "255.255.254.0") || 
			isInNet( host, "130.226.10.0",  "255.255.255.0") || 
			isInNet( host, "130.226.80.0",  "255.255.240.0") || 
			isInNet( host, "172.16.0.0",    "255.255.0.0")   ||  
			isInNet( host, "172.17.0.0",    "255.255.0.0")   || 
			isInNet( host, "127.0.0.1",     "255.255.255.255") 
		   ) 
			return "DIRECT"; 
        	else 
          	return "PROXY proxy.kollegie.dk:3128; DIRECT"; 
    	} 

	else if (url.substring(0, 6) == "https:") { 
		if ( 
			dnsDomainIs(host, ".campusnet.iot.dk") || 
			isInNet( host,"130.225.95.213", "255.255.255.255")
		) 
			return "PROXY proxy.kollegie.dk:3128; DIRECT"; 
		if ( 
			isPlainHostName( host) || 
			dnsDomainIs( host, ".ou.dk") ||  
			dnsDomainIs( host, ".sdu.dk") ||  
			dnsDomainIs( host, ".dou.dk") ||  
			dnsDomainIs( host, ".kollegie.dk") ||  
			dnsDomainIs( host, ".kollegienet.dk") || 
			dnsDomainIs( host, "localhost") || 
			isInNet( host, "130.225.128.0", "255.255.224.0") || 
			isInNet( host, "130.225.160.0", "255.255.252.0") || 
			isInNet( host, "130.226.191.0", "255.255.255.0") || 
			isInNet( host, "130.226.192.0", "255.255.254.0") || 
			isInNet( host, "130.226.194.0", "255.255.255.0") || 
			isInNet( host, "130.225.239.0", "255.255.255.0") || 
			isInNet( host, "130.226.8.0",   "255.255.254.0") || 
			isInNet( host, "130.226.10.0",  "255.255.255.0") || 
			isInNet( host, "130.226.80.0",  "255.255.240.0") || 
			isInNet( host, "172.16.0.0",    "255.255.0.0")   ||  
			isInNet( host, "172.17.0.0",    "255.255.0.0")   || 
			isInNet( host, "127.0.0.1",     "255.255.255.255") 
		   ) 
			return "DIRECT"; 
        	else 
          	return "PROXY proxy.kollegie.dk:3128; DIRECT"; 
    	} 

	else if (url.substring(0, 4) == "ftp:") { 
		if ( 
			isPlainHostName( host) || 
			dnsDomainIs( host, ".ou.dk") ||  
			dnsDomainIs( host, ".sdu.dk") ||  
			dnsDomainIs( host, ".dou.dk") ||  
			dnsDomainIs( host, ".kollegie.dk") ||  
			dnsDomainIs( host, ".kollegienet.dk") || 
			dnsDomainIs( host, "localhost") || 
			isInNet( host, "130.225.128.0", "255.255.224.0") || 
			isInNet( host, "130.225.160.0", "255.255.252.0") || 
			isInNet( host, "130.226.191.0", "255.255.255.0") || 
			isInNet( host, "130.226.192.0", "255.255.254.0") || 
			isInNet( host, "130.226.194.0", "255.255.255.0") || 
			isInNet( host, "130.225.239.0", "255.255.255.0") || 
			isInNet( host, "130.226.8.0",   "255.255.254.0") || 
			isInNet( host, "130.226.10.0",  "255.255.255.0") || 
			isInNet( host, "130.226.80.0",  "255.255.240.0") || 
			isInNet( host, "172.16.0.0",    "255.255.0.0")   ||  
			isInNet( host, "172.17.0.0",    "255.255.0.0")   || 
			isInNet( host, "127.0.0.1",     "255.255.255.255") 
		   ) 
			return "DIRECT"; 
        	else 
          	return "PROXY proxy.kollegie.dk:3128; DIRECT"; 
    	} 

	else if (url.substring(0, 7) == "gopher:") { 
		if ( 
			isPlainHostName( host) || 
			dnsDomainIs( host, ".ou.dk") ||  
			dnsDomainIs( host, ".sdu.dk") ||  
			dnsDomainIs( host, ".dou.dk") ||  
			dnsDomainIs( host, ".kollegie.dk") ||  
			dnsDomainIs( host, ".kollegienet.dk") || 
			dnsDomainIs( host, "localhost") || 
			isInNet( host, "130.225.128.0", "255.255.224.0") || 
			isInNet( host, "130.225.160.0", "255.255.252.0") || 
			isInNet( host, "130.226.191.0", "255.255.255.0") || 
			isInNet( host, "130.226.192.0", "255.255.254.0") || 
			isInNet( host, "130.226.194.0", "255.255.255.0") || 
			isInNet( host, "130.225.239.0", "255.255.255.0") || 
			isInNet( host, "130.226.8.0",   "255.255.254.0") || 
			isInNet( host, "130.226.10.0",  "255.255.255.0") || 
			isInNet( host, "130.226.80.0",  "255.255.240.0") || 
			isInNet( host, "172.16.0.0",    "255.255.0.0")   ||  
			isInNet( host, "172.17.0.0",    "255.255.0.0")   || 
			isInNet( host, "127.0.0.1",     "255.255.255.255") 
		   ) 
return "DIRECT"; 
        	else 
          	return "PROXY proxy.kollegie.dk:3128; DIRECT"; 
    	} 
 
    	else { 
        	return "DIRECT"; 
    	} 
}
what I understand from this file is that you can use
export http_proxy=http://proxy.kollegie.dk:3128/
and probable also for ftp:
export ftp_proxy=http://proxy.kollegie.dk:3128/ <<< maybe you need to change http:// to ftp://
greetings,
Nathan
Top
Post Reply

6 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic