好,我把我操作的详细步骤列在这里,你看看能不能找出问题所在。
一、首先是关于vps上相关组件的安装,我是完全按照你上面的教程操作的。我的vps的系统是centos 6.7。安装成功后,是下面的状况:
[root@vpn ~]# obfsproxy
usage: obfsproxy [-h] [-v] [--log-file LOG_FILE]
[--log-min-severity {error,warning,info,debug}] [--no-log]
[--no-safe-logging] [--data-dir DATA_DIR] [--proxy PROXY]
{obfs3,obfs2,dummy,managed,b64,scramblesuit} ...
obfsproxy: error: too few arguments
二、关于obfsproxy混淆的试验过程
为了试验混淆效果,我在vps上安装了socks5服务(这个肯定是会被墙的),socks的监听端口是9080,我在IE中设置代理为这个服务,第一次是可以访问网站的,第二次时就被墙重置链接了。
然后我用obfsproxy混淆这个socks5的服务,vps端运行的命令行为:
obfsproxy --log-file obfsproxy_socks.log --log-min-severity debug --data-dir /tmp/obfs/socks scramblesuit --password FUCKGFWFUCKFANGBINXINGFBX4SBDASB --dest
127.0.0.1:9080 server
0.0.0.0:9180
在Windows端我运行的命令行为:
obfsproxy.exe --log-file obfsproxy_socks.log --log-min-severity debug scramblesuit --password FUCKGFWFUCKFANGBINXINGFBX4SBDASB --dest %vps_ip%:9180 client
127.0.0.1:9080
然后我将IE的代理服务器设置为:127.0.0.1:9080(socks代理),再次访问网站。然后从vps端和windows端的日志文件中得到如下日志:
VPS端日志:
[root@vpn ~]# more obfsproxy_socks.log
2015-09-23 12:15:45,057 [WARNING] Obfsproxy (version: 0.2.13) starting up.
2015-09-23 12:15:45,057 [DEBUG] argv: ['/usr/bin/obfsproxy', '--log-file', 'obfsproxy_socks.log', '--log-min-severity', 'debug', '--data-dir', '/tmp/obfs/socks', 'scramblesuit',
2015-09-23 12:15:45,057 [DEBUG] args: Namespace(data_dir='/tmp/obfs/socks', dest=('127.0.0.1', 9080), ext_cookie_file=None, listen_addr=('0.0.0.0', 9180), log_file='obfsproxy_so
cks.log', log_min_severity='debug', mode='server', name='scramblesuit', no_log=False, no_safe_logging=False, proxy=None, uniformDHSecret='FUCKGFWFUCKFANGBINXINGFBX4SBDASB', vali
dation_function=<bound method type.validate_external_mode_cli of <class 'obfsproxy.transports.scramblesuit.scramblesuit.ScrambleSuitTransport'>>)
2015-09-23 12:15:45,058 [ERROR]
################################################
Do NOT rely on ScrambleSuit for strong security!
################################################
2015-09-23 12:15:45,058 [DEBUG] Setting the state location to `/tmp/obfs/socks/scramblesuit/'.
2015-09-23 12:15:45,058 [INFO] Writing server password to file `/tmp/obfs/socks/scramblesuit/server_password'.
2015-09-23 12:15:45,076 [INFO] StaticDestinationServerFactory starting on 9180
2015-09-23 12:15:45,077 [INFO] Starting factory <obfsproxy.network.network.StaticDestinationServerFactory instance at 0x1456758>
2015-09-23 12:15:45,077 [DEBUG] fact_s_0x1456758: Starting up static destination server factory.
2015-09-23 12:15:45,077 [INFO] Launched 'server' listener at '[scrubbed]:9180' for transport 'scramblesuit'.
2015-09-23 12:18:01,016 [DEBUG] fact_s_0x1456758: New connection from [scrubbed]:28045.
2015-09-23 12:18:01,016 [DEBUG] Initialising ScrambleSuit.
2015-09-23 12:18:01,016 [INFO] Attempting to load the server's state file from `/tmp/obfs/socks/scramblesuit/server_state.cpickle'.
2015-09-23 12:18:01,023 [DEBUG] Switching to state ST_WAIT_FOR_AUTH.
2015-09-23 12:18:01,024 [DEBUG] Initialising AES-CTR instance.
2015-09-23 12:18:01,024 [DEBUG] Initialising AES-CTR instance.
2015-09-23 12:18:01,024 [INFO] Starting factory <obfsproxy.network.network.StaticDestinationClientFactory instance at 0x1460638>
2015-09-23 12:18:01,024 [DEBUG] fact_c_0x1460638: Client factory started connecting.
2015-09-23 12:18:01,025 [DEBUG] conn_0x1400fd0: connectionMade (server): Setting it as downstream on our circuit.
2015-09-23 12:18:01,025 [DEBUG] circ_0x14605f0: Setting downstream connection (conn_0x1400fd0).
2015-09-23 12:18:01,035 [DEBUG] conn_0x1462350: connectionMade (server): Setting it as upstream on our circuit.
2015-09-23 12:18:01,035 [DEBUG] circ_0x14605f0: Setting upstream connection (conn_0x1462350).
2015-09-23 12:18:01,035 [DEBUG] circ_0x14605f0: Circuit completed.
2015-09-23 12:18:01,045 [DEBUG] conn_0x1400fd0: dataReceived called without a reason.
2015-09-23 12:18:01,124 [DEBUG] circ_0x14605f0: downstream: Received 442 bytes.
2015-09-23 12:18:01,124 [DEBUG] Attempting to decrypt and verify ticket.
2015-09-23 12:18:01,124 [DEBUG] Attempting to extract the remote machine's UniformDH public key out of 442 bytes of data.
2015-09-23 12:18:01,124 [DEBUG] Successfully located the mark.
2015-09-23 12:18:01,125 [DEBUG] HMAC invalid. Trying next epoch value.
2015-09-23 12:18:01,125 [DEBUG] HMAC invalid. Trying next epoch value.
2015-09-23 12:18:01,125 [DEBUG] HMAC invalid. Trying next epoch value.
2015-09-23 12:18:01,125 [WARNING] Could not verify the authentication message's HMAC.
2015-09-23 12:18:01,126 [DEBUG] Authentication unsuccessful so far. Waiting for more data.
2015-09-23 12:18:01,607 [DEBUG] fact_s_0x1456758: New connection from [scrubbed]:17772.
2015-09-23 12:18:01,607 [DEBUG] Initialising ScrambleSuit.
2015-09-23 12:18:01,607 [INFO] Attempting to load the server's state file from `/tmp/obfs/socks/scramblesuit/server_state.cpickle'.
2015-09-23 12:18:01,609 [DEBUG] Switching to state ST_WAIT_FOR_AUTH.
2015-09-23 12:18:01,609 [DEBUG] Initialising AES-CTR instance.
2015-09-23 12:18:01,609 [DEBUG] Initialising AES-CTR instance.
2015-09-23 12:18:01,609 [INFO] Starting factory <obfsproxy.network.network.StaticDestinationClientFactory instance at 0x1468e18>
2015-09-23 12:18:01,610 [DEBUG] fact_c_0x1468e18: Client factory started connecting.
2015-09-23 12:18:01,610 [DEBUG] conn_0x1462710: connectionMade (server): Setting it as downstream on our circuit.
2015-09-23 12:18:01,610 [DEBUG] circ_0x1468dd0: Setting downstream connection (conn_0x1462710).
2015-09-23 12:18:01,611 [DEBUG] conn_0x1462850: connectionMade (server): Setting it as upstream on our circuit.
2015-09-23 12:18:01,611 [DEBUG] circ_0x1468dd0: Setting upstream connection (conn_0x1462850).
2015-09-23 12:18:01,611 [DEBUG] circ_0x1468dd0: Circuit completed.
2015-09-23 12:18:01,621 [DEBUG] conn_0x1462710: dataReceived called without a reason.
2015-09-23 12:18:01,717 [DEBUG] circ_0x1468dd0: downstream: Received 1451 bytes.
2015-09-23 12:18:01,718 [DEBUG] Attempting to decrypt and verify ticket.
2015-09-23 12:18:01,718 [DEBUG] Attempting to extract the remote machine's UniformDH public key out of 1451 bytes of data.
2015-09-23 12:18:01,718 [DEBUG] Successfully located the mark.
2015-09-23 12:18:01,718 [DEBUG] HMAC invalid. Trying next epoch value.
2015-09-23 12:18:01,719 [DEBUG] HMAC invalid. Trying next epoch value.
2015-09-23 12:18:01,719 [DEBUG] HMAC invalid. Trying next epoch value.
2015-09-23 12:18:01,719 [WARNING] Could not verify the authentication message's HMAC.
2015-09-23 12:18:01,719 [DEBUG] Authentication unsuccessful so far. Waiting for more data.
Windows端日志:
2015-09-23 16:19:59,858 [WARNING] Obfsproxy (version: unknown) starting up.
2015-09-23 16:19:59,858 [DEBUG] argv: ['obfsproxy.exe', '--log-file', 'obfsproxy_socks.log', '--log-min-severity', 'debug', 'scramblesuit', '--password', 'FUCKGFWFUCKFANGBINXINGFBX4SBDASB', '--dest', '%vps_ip%:9180', 'client', '
127.0.0.1:9080']
2015-09-23 16:19:59,858 [DEBUG] args: Namespace(data_dir=None, dest=('%vps_ip%', 9180), ext_cookie_file=None, listen_addr=('127.0.0.1', 9080), log_file='obfsproxy_socks.log', log_min_severity='debug', mode='client', name='scramblesuit', no_log=False, no_safe_logging=False, proxy=None, uniformDHSecret='FUCKGFWFUCKFANGBINXINGFBX4SBDASB', validation_function=<bound method type.validate_external_mode_cli of <class 'obfsproxy.transports.scramblesuit.scramblesuit.ScrambleSuitTransport'>>)
2015-09-23 16:19:59,858 [ERROR]
################################################
Do NOT rely on ScrambleSuit for strong security!
################################################
2015-09-23 16:19:59,858 [INFO] StaticDestinationServerFactory starting on 9080
2015-09-23 16:19:59,858 [INFO] Starting factory <obfsproxy.network.network.StaticDestinationServerFactory instance at 0x00F9BAD0>
2015-09-23 16:19:59,858 [DEBUG] fact_s_0xf9bad0: Starting up static destination server factory.
2015-09-23 16:19:59,858 [INFO] Launched 'client' listener at '[scrubbed]:9080' for transport 'scramblesuit'.
2015-09-23 16:20:45,655 [DEBUG] fact_s_0xf9bad0: New connection from [scrubbed]:2274.
2015-09-23 16:20:45,655 [DEBUG] Initialising ScrambleSuit.
2015-09-23 16:20:45,655 [DEBUG] Switching to state ST_WAIT_FOR_AUTH.
2015-09-23 16:20:45,655 [DEBUG] Initialising AES-CTR instance.
2015-09-23 16:20:45,655 [DEBUG] Initialising AES-CTR instance.
2015-09-23 16:20:45,655 [DEBUG] Dumping probability distribution.
2015-09-23 16:20:45,671 [DEBUG] P(1169) = 0.807
2015-09-23 16:20:45,671 [DEBUG] P(377) = 0.187
2015-09-23 16:20:45,671 [DEBUG] Dumping probability distribution.
2015-09-23 16:20:45,671 [DEBUG] P(0.00347823032987) = 0.129
2015-09-23 16:20:45,671 [DEBUG] P(0.00427382308033) = 0.035
2015-09-23 16:20:45,671 [DEBUG] P(0.00636557018606) = 0.039
2015-09-23 16:20:45,671 [DEBUG] P(0.00599017665133) = 0.065
2015-09-23 16:20:45,671 [DEBUG] P(0.00550654872604) = 0.717
2015-09-23 16:20:45,671 [INFO] Starting factory <obfsproxy.network.network.StaticDestinationClientFactory instance at 0x00F9CF08>
2015-09-23 16:20:45,671 [DEBUG] fact_c_0xf9cf08: Client factory started connecting.
2015-09-23 16:20:45,671 [DEBUG] conn_0xf92d30: connectionMade (client): Setting it as upstream on our circuit.
2015-09-23 16:20:45,671 [DEBUG] circ_0xf9cee0: Setting upstream connection (conn_0xf92d30).
2015-09-23 16:20:45,671 [DEBUG] conn_0xf92d30: Incomplete circuit; cached 3 bytes.
2015-09-23 16:20:45,812 [DEBUG] conn_0xf929b0: connectionMade (client): Setting it as downstream on our circuit.
2015-09-23 16:20:45,812 [DEBUG] circ_0xf9cee0: Setting downstream connection (conn_0xf929b0).
2015-09-23 16:20:45,812 [DEBUG] circ_0xf9cee0: Circuit completed.
2015-09-23 16:20:45,812 [DEBUG] Attempting to read master key and ticket from file `session_ticket.yaml'.
2015-09-23 16:20:45,812 [DEBUG] Opening `session_ticket.yaml' for reading.
2015-09-23 16:20:45,812 [INFO] Found no ticket for bridge `IPv4Address(TCP, '%vps_ip%', 9180)'.
2015-09-23 16:20:45,812 [DEBUG] No session ticket to redeem. Running UniformDH.
2015-09-23 16:20:45,812 [DEBUG] Creating UniformDH handshake message.
2015-09-23 16:20:45,937 [DEBUG] conn_0xf929b0: Writing 442 bytes.
2015-09-23 16:20:45,953 [DEBUG] circ_0xf9cee0: upstream: Received 3 bytes.
2015-09-23 16:20:45,953 [DEBUG] Buffered 3 bytes of outgoing data.
2015-09-23 16:20:46,250 [DEBUG] fact_s_0xf9bad0: New connection from [scrubbed]:2276.
2015-09-23 16:20:46,250 [DEBUG] Initialising ScrambleSuit.
2015-09-23 16:20:46,250 [DEBUG] Switching to state ST_WAIT_FOR_AUTH.
在上面的日志和命令行中,%vps_ip%代理我的VPS的IP地址,为了安全,这里隐去。
请看一下问题出在哪里?谢谢。