Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Oct 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Block surfers using proxies

    I wish to put a javascript on my site that will redirect users if they are using a proxy.

    Information, transmitted by a client to a server is available (accessible) for a server as environment variables. How do I get hold of these environmental variables in javascript??

    I want to redirect surfers for when their environmental variable

    HTTP_VIA = not empty

    What is the above line in javascript?

    I think this strategy will be good for redirecting users using a proxy as HTTP_VIA not being empty indicates the surfer using a proxy. Although of course it will not work for elite proxies - proxues that can hide that a proxy is even being used - where HTTP_VIA IS empty. Below, I have put a bit of info about the different proxy types for your interest.

    P.S does anyone know what percentage of web surfers use a proxy? What percentage of these use a transparent proxy and what percentage an anonymous proxy?

    1) Transparent Proxies They do not hide information about your IP address:
    REMOTE_ADDR = proxy IP
    HTTP_VIA = proxy IP
    HTTP_X_FORWARDED_FOR = your IP

    2) Anonymous Proxies

    a) simple anonymous proxies - these do not hide that a proxy is being used. They replace your IP with their own
    REMOTE_ADDR = proxy IP
    HTTP_VIA = proxy IP
    HTTP_X_FORWARDED_FOR = proxy IP

    b) distorting proxies - these do not hide that a proxy is being used. They replace your IP with another (arbitary, random) IP
    REMOTE_ADDR = proxy IP
    HTTP_VIA = proxy IP
    HTTP_X_FORWARDED_FOR = random IP address

    c) High Anonymity Proxies (Elite proxies)
    REMOTE_ADDR = proxy IP
    HTTP_VIA = not determined
    HTTP_X_FORWARDED_FOR = not determined

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this isn't a JS question. it's a serverside one. re-post or move to the appropriate forum.
    *keep it simple (TM)

  • #3
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As Jbot pointed out... This is strictly serverside...
    Guardian has a freely distributed script called AZenv: AZ Environment variables
    which can be found here and should be easily adaptable for your needs.....

    There are actually 20 or more enviormental variables which can be checked for proxies.... But be advised, most (nearly all) surfers knowledgable enough to use a proxy will be surfing high anonymity so you will be most likely chasing ghosts...

    I do not know the percentage of users that use proxies to protect their privacy but my network will only connect thru a proxy and/or SOCKS and nearly everyone I know does the same....

    .....Willy

  • #4
    New Coder
    Join Date
    Oct 2004
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript

    My Q did have some relevance to javascript - I was asking whether you can get these environmental variables into variables into a javascript? So, I can play with them in javascript. I know that PHP and other server side is prob better - but for stubborness I want to use javascript if i can.

  • #5
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    simply assign the javascript variable value to that of the enviormental variable from the server....

  • #6
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by rhodopsin
    for stubborness I want to use javascript if i can.
    and what if the user has JS turned off? 10-13% users have no JS support, that's a rather large chunk of your potential audience.
    *keep it simple (TM)

  • #7
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    so just get it to redirect in any case with javascript .. if they have no javascript it just doesnt move anywhere.. this page could display "please enable javascript" or something similar (i usually have insulting things behind frames and iframes anyway for if they are disabled )

    i dont really believe that statistic 10 - 13%.. i dont know anyone that uses this (i did a survey of 250 people and no1 had it disabled or a browser old enough to not have it.. however a college student showed me that his college would show up as using javscript if u just did it in a <script>...<script> on that page but if you tried to use <script src=".."></script> it didnt run it.. maby some automatic tests are fooled by this or something.. i just used <script>..</script> anyway


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •