There a simple way to add the credentials to the svn client:
%appdata%\Subversion\servers
http-proxy-host=proxy-corpo
http-proxy-port=80
http-proxy-username=username
http-proxy-password=password
Showing posts with label proxy. Show all posts
Showing posts with label proxy. Show all posts
Tuesday, May 13, 2014
Thursday, April 3, 2014
Request forwarding based on HTTP Header
HTTP Proxy example:
<VirtualHost 1.2.3.4:80>
ServerName dynamic-proxy.company.com
DocumentRoot "/application/web_server/root"
CustomLog logs/dynamic-proxy.access_80.log combined env=!nolog
ErrorLog logs/dynamic-proxy.error_80.log
RewriteEngine on
<Directory /application/web_server/root>
Order Deny,Allow
Allow from all
</Directory>
AddDefaultCharset UTF-8
#################################################################################
# Server #1
#################################################################################
RewriteCond /application/web_server/srv01/%{HTTP:x-msisdn} -f
RewriteRule ^/root/(.*)$ http://srv01.int.company.com/root/$1 [L,NE]
#################################################################################
# Server #2
#################################################################################
RewriteCond /application/web_server/srv02/%{HTTP:x-msisdn} -f
RewriteRule ^/root/(.*)$ http://srv02.int.company.com/root/$1 [L,NE]
#################################################################################
# Server #3
#################################################################################
RewriteCond /application/web_server/srv03/%{HTTP:x-msisdn} -f
RewriteRule ^/root/(.*)$ http://srv03.int.company.com/root/$1 [L,NE]
#################################################################################
# DEFAULT
#################################################################################
RewriteRule ^/root/(.*)$ http://prd01.int.company.com/root/$1 [L,NE]
# Avoid Cross Site Scripting
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRuLe .* - [F]
</VirtualHost>
<VirtualHost 1.2.3.4:80>
ServerName dynamic-proxy.company.com
DocumentRoot "/application/web_server/root"
CustomLog logs/dynamic-proxy.access_80.log combined env=!nolog
ErrorLog logs/dynamic-proxy.error_80.log
RewriteEngine on
<Directory /application/web_server/root>
Order Deny,Allow
Allow from all
</Directory>
AddDefaultCharset UTF-8
#################################################################################
# Server #1
#################################################################################
RewriteCond /application/web_server/srv01/%{HTTP:x-msisdn} -f
RewriteRule ^/root/(.*)$ http://srv01.int.company.com/root/$1 [L,NE]
#################################################################################
# Server #2
#################################################################################
RewriteCond /application/web_server/srv02/%{HTTP:x-msisdn} -f
RewriteRule ^/root/(.*)$ http://srv02.int.company.com/root/$1 [L,NE]
#################################################################################
# Server #3
#################################################################################
RewriteCond /application/web_server/srv03/%{HTTP:x-msisdn} -f
RewriteRule ^/root/(.*)$ http://srv03.int.company.com/root/$1 [L,NE]
#################################################################################
# DEFAULT
#################################################################################
RewriteRule ^/root/(.*)$ http://prd01.int.company.com/root/$1 [L,NE]
# Avoid Cross Site Scripting
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRuLe .* - [F]
</VirtualHost>
Tuesday, February 4, 2014
Cntlm - Install (Windows)
Cntlm is an NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy
- Downdload from the official website : cntlm.sourceforge.net
- Unzip to the destination folder, we will call it CNTLM_HOME, ex.: C:\dev\Cntlm
- Create an environment variable (if you don't know how, click here)Name: CNTLM_HOME
Value: C:\dev\Cntlm (it's only an example, choose your destination's folder) - Add to the PATH this new variable CNTLM_HOME (if you don't know how, click here)
- Take a backup of the original configuration file %CNTLM_HOME%\cntlm.ini => cntlm.ini.default
- Remplace the content of the file in %CNTLM_HOME%\cntlm.ini by...# Cntlm Authentication Proxy ConfigurationUsername testuserDomain corp-uk# List of parent proxies to use. More proxies can be defined# one per line in format <proxy_ip>:<proxy_port>Proxy proxy-name:8080# List addresses you do not want to pass to parent proxies# * and ? wildcards can be usedNoProxy localhost, 127.0.0.*, 10.*, 192.168.*# Specify the port cntlm will listen on# You can bind cntlm to specific interface by specifying# the appropriate IP address also in format <local_ip>:<local_port># Cntlm listens on 127.0.0.1:3128 by defaultListen 3128Auth NTLMv2PassNTLMv2
- Replace by your own personal informations:Username testuserDomain corp-ukProxy proxy-name:8080
- In commande line type this command and enter your password :>cntlm -I -M http://test.com -c C:\dev\Cntlm\cntlm.ini[PASSWORD]Password:Config profile 1/4... OK (HTTP code: 200)----------------------------[ Profile 0 ]------Auth NTLMv2PassNTLMv2 AA1A11AAA11AAAA1AA11A1AAAA11A11A------------------------------------------------Notice: If you get an HTTP code 302, it's fine too.
- Copy the value of PassNTLMv2 from the output AA1A11AAA11AAAA1AA11A1AAAA11A11A to the file cntlm.ini, on the same line as PassNTLMv2
- In commande line:> cntlm -f -c C:\dev\Cntlm\cntlm.inicntlm: PID 15264: Cntlm ready, staying in the foreground
Subscribe to:
Posts (Atom)