%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/net/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/net/socks.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303\304\305\306\307\310\311&	\210\312\313\314\315\316DD\317\320\321%\207" [custom-declare-group socks nil "SOCKS support." :version "22.2" :prefix "socks-" :group processes custom-declare-variable socks-server funcall function #[0 "\300\301\302\303F\207" ["Default server" "socks" 1080 5] 4] #1="" :type (list (string :format #1# :value "Default server") (string :tag "Server") (integer :tag "Port") (radio-button-choice :tag "SOCKS Version" :format "%t: %v" (const :tag "SOCKS v4  " :format "%t" :value 4) (const :tag "SOCKS v5" :format "%t" :value 5)))] 10)
(defconst socks-version 5)
(defvar socks-debug nil)
(defconst socks-connect-command 1)
(defconst socks-bind-command 2)
(defconst socks-udp-associate-command 3)
(defconst socks-authentication-null 0)
(defconst socks-authentication-failure 255)
(defconst socks-response-success 0)
(defconst socks-response-general-failure 1)
(defconst socks-response-access-denied 2)
(defconst socks-response-network-unreachable 3)
(defconst socks-response-host-unreachable 4)
(defconst socks-response-connection-refused 5)
(defconst socks-response-ttl-expired 6)
(defconst socks-response-cmd-not-supported 7)
(defconst socks-response-address-not-supported 8)
(defvar socks-errors '("Succeeded" "General SOCKS server failure" "Connection not allowed by ruleset" "Network unreachable" "Host unreachable" "Connection refused" "Time-to-live expired" "Command not supported" "Address type not supported"))
(defconst socks-address-type-v4 1)
(defconst socks-address-type-name 3)
(defconst socks-address-type-v6 4)
(defvar socks-timeout 5)
(defvar socks-authentication-methods nil)
(defvar socks-username (user-login-name))
(defvar socks-password nil)
#@25 

(fn ID DESC CALLBACK)
(defalias 'socks-register-authentication-method #[771 "\236\211\203\211B\241\202BBB\211\207" [socks-authentication-methods] 7 (#$ . 2120)])
#@11 

(fn ID)
(defalias 'socks-unregister-authentication-method #[257 "\211\236\211\205
\301\"\211\207" [socks-authentication-methods delq] 5 (#$ . 2303)])
(socks-register-authentication-method 0 "No authentication" 'identity)
(defalias 'socks-build-auth-list #[0 "\301C\302C\303\304\305\306\307\310\"\311\"\312\313%\314!\"\210\315\316\242\242#\207" [socks-authentication-methods 0 "" mapc make-byte-code 257 "\302AA!\205\301\303\304\301\242@#\240\210\300\211\242T\240\207" vconcat vector [fboundp format "%s%c"] 6 "\n\n(fn X)" reverse format "%c%s"] 10])
(defconst socks-state-waiting-for-auth 0)
(defconst socks-state-submethod-negotiation 1)
(defconst socks-state-authenticated 2)
(defconst socks-state-waiting 3)
(defconst socks-state-connected 4)
#@23 

(fn PROC CUR-STATE)
(defalias 'socks-wait-for-state-change #[514 "\301\302\"U\205\303!\304>\205\305\"\210\202\207" [socks-timeout process-get socks-state process-status (run open) accept-process-output] 5 (#$ . 3073)])
#@20 

(fn PROC STRING)
(defalias 'socks-filter #[514 "\211C\306\211\211\307\310\"\204\311\312\"\210\307\313\"\262U\203c\314\315\316\317\320\321\322\f!\323\"\324\325%\307\315\"!#\266\242G\326W?\205j\314\327\242\330H#\210\314\315\331\242\326\306##\210\314\313	#\202j	U\206j\nU\206jU\203g\314\315\316\317\320\321\322\f!\323\"\324\325%\307\315\"!#\266\307\332\"\262\333\267\202c\334\335\242\"\205j\314\313\f#\210\314\336\337#\210\314\340\242#\202j\242G\326W?\205j\341\262\242GW?\205j\242\330H\211\342U\203\336\337\262\314\313\f#\210\314\336#\210\314\340\242#\262\202j\242G\324W?\205j\343\242\344H
U\203\324\2028(U\203\345\2028)U\2037\242G\346W\203/\347\2028\242\324HT\2028\306\262\\\262\242GW?\205j\314\313\f#\210\314\336\242\330H#\210\314\340\242#\202j\306\202j\fU\266\203\207" [socks-state-waiting-for-auth socks-state-submethod-negotiation socks-state-authenticated socks-state-waiting socks-state-connected socks-address-type-v4 nil process-get socks error "socks-filter called on non-SOCKS connection %S" socks-state process-put socks-scratch make-byte-code 257 "\300\211\242P\240\207" vconcat vector [] 4 "\n\n(fn S)" 2 socks-authtype 1 substring socks-server-protocol #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (http 155 4 188 5 249)) string-match "
\n
\n" socks-reply 0 socks-response 8 90 6 3 16 5 255 socks-address-type-v6 socks-address-type-name] 16 (#$ . 3311)])
#@79 If non-nil, overwrite `open-network-stream' function with SOCKSified version.
(defvar socks-override-functions nil (#$ . 4846))
(byte-code "\203\n\301\302\303\304#\210\301\207" [socks-override-functions advice-add open-network-stream :around socks--open-network-stream] 4)
#@20 

(fn SERVER-INFO)
(defalias 'socks-open-connection #[257 "\212\306\307\310\306A@\3118$)\306\211\312\313\"\210\314\306\"\210\315\316\317#\210\315\320	#\210\315\321\n#\210\315\322\3238#\210\315\324A@#\210\3238\262\211\325=\204\324\211\326\232\204\324\211\327\232\203\324\330\331\332\333 #\"\210\334	\"\210\335\321\"\262\fU\203{
\203\310\336\337!\210\202\310\nU\203\210\340\341!\210\202\310\335\321\"\342'\"\211\205\230\211AA\205\237A@\312\306\"\210\203\266\343!\203\266!\204\306\344!\210\340\345\206\302\346#\210\266\315\320(#\210\312\313\"\210\266\203)\207" [socks-override-functions socks-state-waiting-for-auth socks-authentication-failure socks-version socks-authentication-null socks-debug nil open-network-stream "socks" 2 set-process-filter socks-filter set-process-query-on-exit-flag process-put socks t socks-state socks-authtype socks-server-protocol 3 socks-server-name http 4 5 process-send-string format "%c%s" socks-build-auth-list socks-wait-for-state-change process-get message "No authentication necessary" error "No acceptable authentication methods found" assoc fboundp delete-process "Failed to use auth method: %s (%d)" "Unknown" socks-authentication-methods socks-state-authenticated] 12 (#$ . 5127) nil])
#@40 

(fn PROC COMMAND ATYPE ADDRESS PORT)
(defalias 'socks-send-command #[1285 "U\204\f	U\203\202#\nU\203\306\307G#\202#\310\311\"\312\211\313\314\"\2043\310\315	\"\210\316\317#\210\313\320\"\262\211\321\267\202\226\306\322\n\232\203U\202Z\310\323	\"#\262\202\233\324\325\326\"\327\330\"$\331 \332R\262\202\233\324\333	$\324\325\326\"\327\330\"\"Q\262\202\233\310\334\"\210\335\"\210\336\"\210\337!\210\313\340\"\206\265\341\fU\204\316\342!\210\310\343\313\n\340\"\206\312\341
8\"\210\207" [socks-address-type-v4 socks-address-type-v6 socks-address-type-name socks-state-waiting socks-response-success socks-errors format "%c%s" error "Unknown address type: %d" nil process-get socks "socks-send-command called on non-SOCKS connection %S" process-put socks-state socks-server-protocol #s(hash-table size 3 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (http 71 4 98 5 123)) "CONNECT %s:%d HTTP/1.0
\nUser-Agent: Emacs/SOCKS v1.0
\n
\n" "Unsupported address type for HTTP: %d" unibyte-string ash -8 logand 255 user-full-name "" 0 "Unknown protocol version: %d" process-send-string socks-wait-for-state-change process-status socks-reply 1 delete-process "SOCKS: %s"] 15 (#$ . 6419)])
#@75 List of regexps matching hosts that we should not socksify connections to
(defvar socks-noproxy nil (#$ . 7703))
#@21 

(fn HOST SERVICE)
(defalias 'socks-find-route #[514 "	\211\2035\211@\302H\303=\203 \304\305@\306\"\"\203.\307\262\202.\304@\"\203.\307\262\307\262\211A\262\202\207" [socks-server socks-noproxy 0 33 string-match substring 1 nil] 8 (#$ . 7822)])
(defvar socks-services-file "/etc/services")
(defvar socks-tcp-services (make-hash-table :size 13 :test 'equal))
(defvar socks-udp-services (make-hash-table :size 13 :test 'equal))
(defalias 'socks-parse-services #[0 "\303!\203\f\304!\204\305\306\"\210\307	!\210\307\n!\210r\310\311!q\210\312 \210\313!\210eb\210\314\315\316\317#\2038\320\321!\210\202)eb\210\314\322\316\317#\203J\320\321!\210\202;eb\210\316\211\211\314\323\316\317#\205~\324\325!\227\262\326\324\327!!\262\324\330!\227\262\331\332\232\203x\n\202y	#\210\202P\266\203)\207" [socks-services-file socks-tcp-services socks-udp-services file-exists-p file-readable-p error "Could not find services file: %s" clrhash get-buffer-create " *socks-tmp*" erase-buffer insert-file-contents re-search-forward "#.*" nil t replace-match "" "^[ 	\n]+" "^\\([^ 	]+\\)[ 	]+\\([0-9]+\\)/\\([a-z]+\\)" match-string 1 string-to-number 2 3 puthash "udp"] 8])
#@72 Return the port # associated with SERVICE.

(fn SERVICE &optional UDP)
(defalias 'socks-find-services-entry #[513 "\302!\303U\203\304 \210\305\227\203	\202\"\207" [socks-tcp-services socks-udp-services hash-table-count 0 socks-parse-services gethash] 5 (#$ . 9016)])
#@33 

(fn NAME BUFFER HOST SERVICE)
(defalias 'socks-open-network-stream #[1028 "\301\302\303%)\207" [socks-override-functions t socks--open-network-stream #[128 "\301\302\303\")\207" [socks-override-functions nil apply open-network-stream] 4 "\n\n(fn &rest ARGS)"]] 10 (#$ . 9299)])
#@55 

(fn ORIG-FUN NAME BUFFER HOST SERVICE &rest PARAMS)
(defalias 'socks--open-network-stream #[1413 "\205\304\"\211\204\305&\202\222\306!\307\310\"\211\311\232\203H\312!\262<\204<\313\314\"\210\305\315\316#\262	\202I\n\317\n\n;\203d\320!\206f\313\321\f\"\202f\n%\210\322\323\n#\210\322\324	#\210\322\325	#\210\326\327\"\210\330	\205\215\331\n!\"\210\266\203\207" [socks-override-functions socks-address-type-v4 socks-address-type-name socks-connect-command socks-find-route apply socks-open-connection process-get socks-server-protocol 4 socks-nslookup-host error "Could not get IP address for: %s" format "%c%c%c%c" socks-send-command socks-find-services-entry "Unknown service: %s" process-put socks-buffer socks-host socks-service set-process-filter nil set-process-buffer get-buffer-create] 18 (#$ . 9592)])
(socks-register-authentication-method 2 "Username/Password" 'socks-username/password-auth)
(defconst socks-username/password-auth-version 1)
#@17 

(fn PROC STR)
(defalias 'socks-username/password-auth-filter #[514 "\301\302\"\204\f\303\304\"\210\305\306\307\310\311\312\313	!\314\"\315\316%\301\306\"!#\266\301\306\"G\317W?\205@\305\320\301\306\"\321H#\210\305\322#\207" [socks-state-authenticated process-get socks error "socks-filter called on non-SOCKS connection %S" process-put socks-scratch make-byte-code 257 "\211\300P\207" vconcat vector [] 3 "\n\n(fn S)" 2 socks-password-auth-status 1 socks-state] 12 (#$ . 10609)])
#@13 

(fn PROC)
(defalias 'socks-username/password-auth #[257 "\303\304\"\204\305\306\307	\303\310\"#!\311\312\313#\210\314\315\"\210\316\306\317\n	G	G&\"\210\320\"\210\303\321\"\322U\207" [socks-password socks-username socks-username/password-auth-version process-get socks-state read-passwd format "Password for %s@%s: " socks-server-name process-put socks-scratch "" set-process-filter socks-username/password-auth-filter process-send-string "%c%c%s%c%s" socks-wait-for-state-change socks-password-auth-status 0] 11 (#$ . 11111)])
#@13 

(fn PROC)
(defalias 'socks-gssapi-auth #[257 "\300\207" [nil] 2 (#$ . 11663)])
#@13 

(fn PROC)
(defalias 'socks-chap-auth #[257 "\300\207" [nil] 2 (#$ . 11750)])
#@13 

(fn PROC)
(defalias 'socks-cram-auth #[257 "\300\207" [nil] 2 (#$ . 11835)])
(byte-code "\300\301\302\303\304DD\305\306\307%\207" [custom-declare-variable socks-nslookup-program funcall function #[0 "\300\207" [#1="nslookup"] 1 #1#] "If non-nil then a string naming the nslookup program." :type (choice (const :tag "None" :value nil) string)] 6)
#@78 Attempt to resolve the given HOSTNAME using nslookup if possible.

(fn HOST)
(defalias 'socks-nslookup-host #[257 "\203C\301\302\211$\303\304\"\210r\305!q\210\306!\210\307!\310>\204eb\210\311\312\304\313#\203=\314\224\314\225{\262\315\316\317\320\"\"\262\321p!\210)\207\207" [socks-nslookup-program start-process " *nslookup*" set-process-query-on-exit-flag nil process-buffer accept-process-output process-status (run open) re-search-forward "Name:.*\nAddress\\(es\\)?: *\\([0-9.]+\\)$" t 2 mapcar string-to-number split-string "\\." kill-buffer] 8 (#$ . 12189) "sHost:  "])
(provide 'socks)

Zerion Mini Shell 1.0