Overview
SHA1 Hash: | 307233d828ecccdded86d89973523a9ab7271c8b |
---|---|
Date: | 2007-10-02 10:34:46 |
User: | mjanssen |
Comment: | Added rudimentary proxy support to fossil chat client |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/fossil_chat.tcl from [eef7e18abf] to [c673398270].
@@ -7,10 +7,14 @@ set SERVERHOST fossil-scm.hwaci.com # set SERVERHOST 127.0.0.1 #set SERVERHOST 64.5.53.192 set SERVERPORT 8615 +# set to correct values if you have to use a proxy +set PROXYHOST {} +set PROXYPORT {} + # Setup the user interface wm title . Fossil-Chat wm iconname . [wm title .] menu .mb -type menubar @@ -77,11 +81,18 @@ # Connect to the server proc connect {} { global SOCKET tcl_platform catch {close $SOCKET} if {[catch { - set SOCKET [socket $::SERVERHOST $::SERVERPORT] + if {$::PROXYHOST ne {}} { + set SOCKET [socket $::PROXYHOST $::PROXYPORT] + puts $SOCKET "CONNECT $::SERVERHOST:$::SERVERPORT HTTP/1.1" + puts $SOCKET "Host: $::SERVERHOST:$::SERVERPORT" + puts $SOCKET "" + } else { + set SOCKET [socket $::SERVERHOST $::SERVERPORT] + } fconfigure $SOCKET -translation binary -blocking 0 puts $SOCKET [list login $tcl_platform(user) fact,fuzz] flush $SOCKET fileevent $SOCKET readable handle_input keep_alive