socks5在于SOCKS代理服务器建立socket连接之后,发出request请求时,返回rep为2!

LBTCO 2001-11-22 11:12:17
最近再看有关socks代理,遇到很多问题,想请教各位大虾,在下先谢了!!
1、通过socks代理访问互联网是否是如下步骤:
客户端先与socks代理服务器建立socket连接;
客户端发送method
服务器返回method (如果需要用户名,密码,再发送用户名密码等)
客户端发送请求(包含目的IP地址,以及端口号)
服务器返回

然后作相关操作(get、put……)

不知道我得理解是否有误??谢谢
2、我用新浪(202.106.184.200:80)作实验,怎么老是返回rep为2,连接未被允许!!

急阿,找不到愿意,多谢各位了!!!
...全文
2397 63 打赏 收藏 转发到动态 举报
写回复
用AI写文章
63 条回复
切换为时间正序
请发表友善的回复…
发表回复
mensong 2002-03-04
  • 打赏
  • 举报
回复
学习
jediluke 2002-02-01
  • 打赏
  • 举报
回复
你的代码我看了。最主要的是对于返回rep为2,也就是需要用户验证部分没写,BIND没写,UDP没写。
返回rep为2后要进行用户验证。方法看RFC1928,1929。
cmpp 2001-12-09
  • 打赏
  • 举报
回复
我来学习一下!
781014 2001-11-29
  • 打赏
  • 举报
回复
1324
fjacee 2001-11-29
  • 打赏
  • 举报
回复
我写过支持SOCK4 和SOCK5的类.
但用户名密码认证有点问题.
可以用的.
在winproxy 中试过.wingate 也过.你返回为2 好象状态不对.看看rfc .
LBTCO 2001-11-26
  • 打赏
  • 举报
回复
各位不要怪我哦,怎么就是老是给不了分,我都给了几次了!!
可能公司的网络有问题!
我回家试试!
superLee 2001-11-25
  • 打赏
  • 举报
回复
xuexi
LBTCO 2001-11-23
  • 打赏
  • 举报
回复
昨晚发现就是端口问题,我写了个SOCKET服务程序,试验是成功了的,特别感谢Kevin_qing(Kevin) 
moony_blue 2001-11-22
  • 打赏
  • 举报
回复
这里有谁有过用wingate调试socks5 rfc1929的成功经验??我想败你为师!(最近太苦闷了:~(
moony_blue 2001-11-22
  • 打赏
  • 举报
回复
一般来讲 代理服务器有这样的过滤功能。
moony_blue 2001-11-22
  • 打赏
  • 举报
回复
正常

我这里也是一样,我用的是wingate。
LBTCO 2001-11-22
  • 打赏
  • 举报
回复
rfc1928,我已经看了好几遍了,但是始终找不出原因所在!!!
LBTCO 2001-11-22
  • 打赏
  • 举报
回复
公司的socks代理服务器为192.168.0.8端口1088
1、我先与代理服务器建立连接,
2、验证
3、发送连接命令cmd为1,目的地址为新浪IP:202.106.184.200,端口80
代理服务器此时始终返回rep=2
!!!
不知道为什么阿!!
moony_blue 2001-11-22
  • 打赏
  • 举报
回复
你用的是什么代理服务器?如何设置的?

以下截至rfc1928 (SOCKS Protocol Version 5)

o REP Reply field:
o X'00' succeeded
o X'01' general SOCKS server failure
o X'02' connection not allowed by ruleset
o X'03' Network unreachable
o X'04' Host unreachable
o X'05' Connection refused
o X'06' TTL expired
o X'07' Command not supported
o X'08' Address type not supported
o X'09' to X'FF' unassigned
LBTCO 2001-11-22
  • 打赏
  • 举报
回复
没人说话了!!
LBTCO 2001-11-22
  • 打赏
  • 举报
回复
但是我访问某个网络服务器的IP地址返回的成功!!

访问新浪的IP怎么就不行呢!!
LBTCO 2001-11-22
  • 打赏
  • 举报
回复
moony_blue(发呆的深蓝) :
你所说的是验证的时候,返回2,则需要用户口令验证。
我说的是这之后,
发送命令,返回2
发送5,1,0,1,-54,106,-72,-56,0,80中间是转换过后的IP地址
moony_blue 2001-11-22
  • 打赏
  • 举报
回复
相关帖子!大家快来看看!帮个忙!
http://www.csdn.net/expert/topic/376/376611.shtm
moony_blue 2001-11-22
  • 打赏
  • 举报
回复
返回02表示proxy server 需要做sock5的rfc1929身份验证
最近我也一直在做这个东东,用wingate做实验老是搞不定rfc1929 真的头痛!
奇怪的地方是:帮助上说wingate做sock5的rfc1929严正时用的是wingate用户数据库,可我传入user/pwd后除了adnimistrator以外的所有注册用户名/口令它都不认!!

大虾们来帮个忙阿!

--------------------------------------------------------------------------
以下为wingate的help中关于rfc1929的内容
1.
Some SOCKS5 clients can use 慠FC1929?(an Internet 憇tandard? authentication. This uses a username and password transmitted as clear text. When a user connects to WinGate, WinGate evaluates the client抯 current level of authentication (Unknown, Assumed or Authenticated), depending on what it already knows about the client. If the user is unknown, and you have the option "Use RFC1929?" enabled, then WinGate will require the user to use this method to raise it抯 security level to Assumed. Otherwise, the client will not be required to use this method. There is a special case here. If a user is assumed to be someone that has no rights to use the SOCKS server, then WinGate will still allow the user to authenticate (using RFC1929). Provided that the user then authenticates as someone with rights to use the SOCKS server, then they will be granted access.

RFC1929 is not very secure, and we recommend that you do not use this method if you are authenticating across an untrusted network, such as the Internet. Because this method is not secure, a user that has used this method will raise their security level only to assumed, not authenticated.

2.
Use RFC1929 Authentication

This option is available for those who have secondary SOCKS authentication servers. Name and Password are taken from the user database. If you use this option, a Guest user will have their authentication level increased to 慳ssumed?while a session is authenticated with this method.

This option is not recommended, as passwords are sent as 'plaintext'.

3.
SOCKS Server
The WinGate SOCKS server is SOCKS 4 and SOCKS 5 (RFC 1928) compliant. It supports RFC1929 authentication using the user accounts in the WinGate User Database. The WinGate SOCKS server is HTTP-aware. It can intercept HTTP requests, and handle them with the built-in WinGate WWW proxy. This means that even your SOCKS users will enjoy the benefits of the WWW proxy (e.g. caching), and can be subject to the same security policies.
Kevin_qing 2001-11-22
  • 打赏
  • 举报
回复
把你的所有发送的东西帖出来看看
加载更多回复(43)

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧