| IO :: ¼ÒÄÏ :: ¾ç¸» ´Â SOCKS Ŭ¶óÀ̾ðÆ® ¶Ç´Â ¼¹ö¸¦ 4 ¹× 5 ¹öÀü ¸ðµÎ »ý¼ºÇÏ´Â ¹æ¹ýÀ» Á¦°øÇÕ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
IO :: ¼ÒÄÏ :: ¾ç¸» ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~oleg/
IO :: ¼ÒÄÏ :: ¾ç¸» ű×
IO :: ¼ÒÄÏ :: ¾ç¸» ¼³¸í
IO :: Socket :: Socks´Â ¾ç¸» ÇÁ·Ï½Ã¿¡ ¿¬°áÇÏ´Â Perl ¸ðµâ·Î °´Ã¼°¡ »ý¼º µÉ ¶§ ¿ø°Ý È£½ºÆ® / Æ÷Æ®¿¡ ´ëÇÑ ¿¬°áÀ» ¿µµ·Ï Áö½ÃÇÕ´Ï´Ù. ¹Þ´Â °´Ã¼´Â ¿ø°Ý È£½ºÆ®¿¡¼ µ¥ÀÌÅ͸¦ º¸³»°í¹Þ´Â µ¥ÀÌÅ͸¦ ¼ÒÄÏÀ¸·Î Á÷Á¢ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. SOCKS Ŭ¶óÀ̾ðÆ® »ý¼º ¿Ü¿¡µµÀÌ ¸ðµâÀ» »ç¿ëÇÏ¿© SOCKS ¼¹ö¸¦ ¸¸µì´Ï´Ù. ¾Æ·¡ÀÇ ¿¹¸¦ ÂüÁ¶ÇϽʽÿÀ. ½Äº° »çÇ× »ç¿ë IO :: Socket :: Socks; MY $ SOCKS = NEW IO :: SOCKET :: SOCKS (ProxyAddr => "ÇÁ·Ï½Ã È£½ºÆ®", proxyport => "ÇÁ·Ï½Ã Æ÷Æ®", ConnectAddr => "¿ø°Ý È£½ºÆ®", connectport => "¿ø°Ý Æ÷Æ®"); $ socks "foo \ n"À» ÀμâÇϽʽÿÀ; $ socks-> close (); ¼¹ö »ç¿ë io :: socket :: socks ': »ó¼ö'; $ SOCKS_SERVER = NEW IO :: SOCKET :: SOCKS (ProxyAddr => "localhost", proxyport => "8000", listen => 1, userauth => \ auth, requireAuth => 1); MY $ SELECT = NEW IO :: SELECT ($ SOCKS_SERVER); while (1) {($ select-> can_read ()) {my $ client = $ socks_server-> accept (); if (! Á¤ÀÇ ($ Ŭ¶óÀ̾ðÆ®)) {print "¿À·ù : $ socks_error \ n"; ´ÙÀ½; } My $ Command = $ Client-> ¸í·É (); if ($ command -> == CMD_Connect) {# $ $ client-> Command_Reply (reply_success, addr, port)¸¦ ó¸®ÇϽʽÿÀ. } ... # Ŭ¶óÀ̾ðÆ®¿¡¼ #read ¹× ¿¬°á ÁÖ¼Ò·Î º¸³»±â ... $ Client-> close (); }} ÇÏÀ§ ÀÎÁõ {My $ user = shift; ³» $ PASS = SHIFT; 1 (($ USER EQ "FOO") ($ PASS EQ "¹Ù")À» ¹ÝȯÇϽʽÿÀ. ¹Ýȯ 0; } Á¦Ç°ÀÇ È¨ÆäÀÌÁö
IO :: ¼ÒÄÏ :: ¾ç¸» °ü·Ã ¼ÒÇÁÆ®¿þ¾î