Mercurial > hg > xemacs-beta
comparison lisp/w3/socks.el @ 169:15872534500d r20-3b11
Import from CVS: tag r20-3b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:46:53 +0200 |
parents | 0293115a14e9 |
children | 3d6bfa290dbd |
comparison
equal
deleted
inserted
replaced
168:9851d5c6556e | 169:15872534500d |
---|---|
1 ;;; socks.el --- A Socks v5 Client for Emacs | 1 ;;; socks.el --- A Socks v5 Client for Emacs |
2 ;; Author: wmperry | 2 ;; Author: wmperry |
3 ;; Created: 1997/01/10 00:13:05 | 3 ;; Created: 1997/06/25 16:25:12 |
4 ;; Version: 1.3 | 4 ;; Version: 1.4 |
5 ;; Keywords: comm, firewalls | 5 ;; Keywords: comm, firewalls |
6 | 6 |
7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 7 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
8 ;;; Copyright (c) 1996, 1997 by William M. Perry (wmperry@cs.indiana.edu) | 8 ;;; Copyright (c) 1996, 1997 by William M. Perry (wmperry@cs.indiana.edu) |
9 ;;; | 9 ;;; |
199 (auth-func (and auth-handler (cdr (cdr auth-handler)))) | 199 (auth-func (and auth-handler (cdr (cdr auth-handler)))) |
200 (auth-desc (and auth-handler (car (cdr auth-handler))))) | 200 (auth-desc (and auth-handler (car (cdr auth-handler))))) |
201 (set-process-filter proc nil) | 201 (set-process-filter proc nil) |
202 (if (and auth-func (fboundp auth-func) | 202 (if (and auth-func (fboundp auth-func) |
203 (funcall auth-func proc)) | 203 (funcall auth-func proc)) |
204 (message "Successfully authenticated using: %s" auth-desc) | 204 nil ; We succeeded! |
205 (delete-process proc) | 205 (delete-process proc) |
206 (error "Failed to use auth method: %s (%d)" | 206 (error "Failed to use auth method: %s (%d)" |
207 (or auth-desc "Unknown") auth-type)) | 207 (or auth-desc "Unknown") auth-type)) |
208 ) | 208 ) |
209 ) | 209 ) |
323 proc))) | 323 proc))) |
324 | 324 |
325 ;; Authentication modules go here | 325 ;; Authentication modules go here |
326 | 326 |
327 ;; Basic username/password authentication, ala RFC 1929 | 327 ;; Basic username/password authentication, ala RFC 1929 |
328 ;; To enable username/password authentication, uncomment the following | 328 (socks-register-authentication-method 2 "Username/Password" |
329 ;; lines: | 329 'socks-username/password-auth) |
330 ;; | |
331 ;; (socks-register-authentication-method 2 "Username/Password" | |
332 ;; 'socks-username/password-auth) | |
333 | 330 |
334 (defconst socks-username/password-auth-version 1) | 331 (defconst socks-username/password-auth-version 1) |
335 | 332 |
336 (if (not (fboundp 'char-int)) | 333 (if (not (fboundp 'char-int)) |
337 (fset 'char-int 'identity)) | 334 (fset 'char-int 'identity)) |