delegate9.4.2 (PROXY)

Tested on 2 Feb 2007 on openSUSE10.2

DeleGate is a multipurpose proxy server which relays various application protocols on TCP/IP or UDP/IP, including HTTP, FTP, Telnet, NNTP, SMTP, POP, IMAP, LPR, LDAP, ICP, DNS, SSL, Socks, and more. DeleGate mediates communication between servers and clients where direct communication is impossible, inefficient, or inconvenient.

Download from Delegate site.

ftp://ftp.delegate.org/pub/DeleGate/

Install

  • Extract files
    # mv delegate9.4.2.tar.gz /usr/local/src
    # cd /usr/local/src
    # tar zxvf delegate9.4.2.tar.gz
    
  • Compile
    # cd delegate9.4.2/
    # make
    ...
    !!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !   You should have defined ADMIN as:                      !
    !     ADMIN = mail-address-of-the-DeleGate-administrator   !
    !   either in DELEGATE_CONF or in the Makefile.      !
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Enter your E-mail address [root@suse10-2]: root@localhost
    OK ?  [y] / n / x(abort): y
    ...
    
  • Copy a binary file. So we use only the binay.
    # cp src/delegated /usr/local/bin
    

    Configure

  • Make /etc/init.d/delegate
    #!/bin/sh
    # chkconfig: 35 99 30
    # description: Delegate Proxy
    DAEMON=/usr/local/bin/delegated
    test -x $DAEMON || exit 0
    
    case "$1" in
      start)
            echo -n "Starting Proxy services: "
            $DAEMON -P8080 \
                    CACHE="do" \
                    ADMIN="root@localhost" \
                    AUTH="admin::admin:admin" \
                    EXPIRE=30d \
                    CRON="0 * * * * -expire 30d" \
                    CRON="0 0 * * * -restart" \
                    DGROOT=/etc/delegate/ \
                    LOGDIR=/var/log/delegate/ \
                    CACHEDIR=/var/cache/delegate/ \
                    MOUNT="/-/builtin/* /etc/delegate/err.html" \
                    PERMIT="*:*:192.168.0.0/24" \
                    PROXY="parent.proxy.server.com:8080:!192.168.0.0/24"
            echo -e \n
            ;;
      stop)
            echo -n "Shutting down Proxy services: "
            $DAEMON -Fkill -P8080 DGROOT=/etc/delegate/
            echo ""
            ;;
      status)
            echo | ps ax | grep delegated
            ;;
      restart)
            echo -n "Restarting Proxy services: "
            $0 stop
            $0 start
            ;;
      reload)
            echo -n "Reloading Proxy services: "
            $0 restart
            ;;
      *)
            echo "Usage: delegate {start|stop|restart|reload|status}"
            exit 1
    esac
    
    Options Description
    Port 8080 -P 8080
    Validity 30 days EXPIRE=30d
    Custody 30 days CRON="0 3 * * * -expire 30d"
    Forward requests parent.proxy.server.com:8080 PROXY="parent.proxy.server.com:8080:*"
    Forward requests except local web server *.my.domain,
    *.near.domain
    PROXY="parent.proxy.server.com:8080:!192.168.0.0/24,!*.my.domain"
    Administrator's mail address root@localhost ADMIN="root@localhost"
    Access Control Grant Access from
    192.168.0.0/24 network to anywhere
    PERMIT="*:*:192.168.0.0/24"
  • Add Permittion, change the runlevel of delegate, create a cache directory, and start
    # chmod 755 delegate
    # chkconfig delegate on
    # mkdir /var/cache/delegate
    # chown nobody:nobody /var/cache/delegate/
    # /etc/init.d/delegate start
    
  • Create a custom error page as, /etc/delegate/err.html
    <html>
    <body>
    <h1>ISP might be down at the moment.</h1>
    </body>
    </html>
    </pre>
    
  • Create /etc/logrotate.d/delegate for log rotation.
    /var/log/delegate/* {
        daily
        compress
        dateext
        notifempty
        rotate 60
        missingok
        create
        olddir /var/log/delegate-old/
        postrotate
         /etc/init.d/delegate restart
        endscript
    }
    
  • Create an old log directory
    # mkdir /var/log/delegate-old
    
  • Now, point the proxy server from your browser, and use it!

  • Back
    Google
    Web www.grape-info.com