代理客戶端
『壹』 我用ccproxy和客戶端Proxifier代理上網為什麼不行,出現下面錯誤信息
要分兩步查:
查服務端CCPROXY是否正常,主要是代理許可權,對方的IP要放到帳戶中。
在IE中直接設它的HTTPS代理,埠一般808,看行不行;
如果正常,再查代理客戶端;
估計是服務端的許可權。
『貳』 動態代理類的客戶端
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
public class Client
{
static public void main(String[] args) throws Throwable
{
RealSubject rs = new RealSubject(); //在這里指定被代理類
InvocationHandler ds = new DynamicSubject(rs); //初始化代理類
Class cls = rs.getClass();
//以下是分解步驟
/*
Class c = Proxy.getProxyClass(cls.getClassLoader(),cls.getInterfaces()) ;
Constructor ct=c.getConstructor(new Class[]{InvocationHandler.class});
Subject subject =(Subject) ct.newInstance(new Object[]{ds});
*/
//以下是一次性生成
Subject subject = (Subject) Proxy.newProxyInstance(cls.getClassLoader(),
cls.getInterfaces(),ds);
subject.request();
}
通過這種方式,被代理的對象(RealSubject)可以在運行時動態改變,需要控制的介面(Subject介面)可以在運行時改變,控制的方式(DynamicSubject類)也可以動態改變,從而實現了非常靈活的動態代理關系(參見文獻2)。
『叄』 ccproxy 如何設置屏蔽代理客戶端上QQ,msn
要禁止某個用戶使用QQ,首先要知道這個用戶的IP,假設他的IP是192.168.0.8,可以在這個用戶的帳號屬性里對應的站點過濾里加上:192.168.0.8;219.133.*;*.tencent.com;202.104.*;202.96.*;218.17.*;218.18.*;61.141.*;61.144.*;58.60.*
如果想屏蔽其他用戶,只需要更改上面的192.168.0.8為對應用戶的IP地址即可。
怎樣屏蔽MSN?
在站點過濾里添加:
*.msn.*;*.hotmail.*;*.live.*;*.allyes.*;*.passport.*
『肆』 怎樣查看自己在哪使用了代理,我的客戶端不讓使用代理服務,可電腦不知道怎麼回事自己連接代理...
3個地方檢查
圖片上的兩個設置就是1、2、回答照著點開看看
1、IE瀏覽器點右鍵屬性點連接在這個選框里有寬頻連接點擊一下再點旁邊的設置就跳出一個對話框這個頁面看看有沒有設置
2、IE瀏覽器點右鍵屬性---連接---區域網設置里設置代理.
3、如果是QQ的話在登陸頁面有個設置點開這里如果在對話框中網路設置項有選項在不使用代理就對了如使用的代理這個對話框上有地址埠都有數字就代表使用了代理
『伍』 不能訪問防火牆客戶端代理服務。此服務可能沒有在運行。
操作順序:打開我的電腦————打開控制面板——打開管理工具——打開服務——找到「防火牆客戶端代理」,右鍵點擊啟動。通過以上操作,就可解決你的問題,希望能幫助你!
『陸』 客戶端提示「使用代理軟體」並斷網怎麼解決
Win7 用戶——打開「控制面板——系統和安全——管理工具——服務」,雙擊「Internet Connection Sharing (ICS)」,啟動類型改為「手動」,服務狀態選擇「停止」
WinXP用戶——打開「控制面板——管理工具——服務」,雙擊「Windows Firewall/Internet Connection Sharing (ICS)」,啟動類型改為「手動」,服務狀態選擇「停止」
『柒』 C#客戶端實現設置代理上網
代理伺服器上網分HTTP連接,Socket4 和 Socket5。
從幾個語句看不出問題,我給個樣板吧。是Socket5連接的,
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
/*
* zahmed
* Date 23 Jan 2004
* Socks 5 RFC is available at http://www.faqs.org/rfcs/rfc1928.html.
*/
namespace ConProxy
{
public class ConnectionException:ApplicationException
{
public ConnectionException(string message)
:base(message)
{
}
}
/// <summary>
/// Provides sock5 functionality to clients (Connect only).
/// </summary>
public class SocksProxy
{
private SocksProxy(){}
#region ErrorMessages
private static string[] errorMsgs= {
"Operation completed successfully.",
"General SOCKS server failure.",
"Connection not allowed by ruleset.",
"Network unreachable.",
"Host unreachable.",
"Connection refused.",
"TTL expired.",
"Command not supported.",
"Address type not supported.",
"Unknown error."
};
#endregion
public static Socket ConnectToSocks5Proxy(string proxyAdress, ushort proxyPort, string destAddress, ushort destPort,
string userName, string password)
{
IPAddress destIP = null;
IPAddress proxyIP = null;
byte[] request = new byte[257];
byte[] response = new byte[257];
ushort nIndex;
try
{
proxyIP = IPAddress.Parse(proxyAdress);
}
catch(FormatException)
{ // get the IP address
proxyIP = Dns.GetHostByAddress(proxyAdress).AddressList[0];
}
// Parse destAddress (assume it in string dotted format "212.116.65.112" )
try
{
destIP = IPAddress.Parse(destAddress);
}
catch(FormatException)
{
// wrong assumption its in domain name format "www.microsoft.com"
}
IPEndPoint proxyEndPoint = new IPEndPoint(proxyIP,proxyPort);
// open a TCP connection to SOCKS server...
Socket s = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
s.Connect(proxyEndPoint);
nIndex = 0;
request[nIndex++]=0x05; // Version 5.
request[nIndex++]=0x02; // 2 Authentication methods are in packet...
request[nIndex++]=0x00; // NO AUTHENTICATION REQUIRED
request[nIndex++]=0x02; // USERNAME/PASSWORD
// Send the authentication negotiation request...
s.Send(request,nIndex,SocketFlags.None);
// Receive 2 byte response...
int nGot = s.Receive(response,2,SocketFlags.None);
if (nGot!=2)
throw new ConnectionException("Bad response received from proxy server.");
if (response[1]==0xFF)
{ // No authentication method was accepted close the socket.
s.Close();
throw new ConnectionException("None of the authentication method was accepted by proxy server.");
}
byte[] rawBytes;
if (/*response[1]==0x02*/true)
{//Username/Password Authentication protocol
nIndex = 0;
request[nIndex++]=0x05; // Version 5.
// add user name
request[nIndex++]=(byte)userName.Length;
rawBytes = Encoding.Default.GetBytes(userName);
rawBytes.CopyTo(request,nIndex);
nIndex+=(ushort)rawBytes.Length;
// add password
request[nIndex++]=(byte)password.Length;
rawBytes = Encoding.Default.GetBytes(password);
rawBytes.CopyTo(request,nIndex);
nIndex+=(ushort)rawBytes.Length;
// Send the Username/Password request
s.Send(request,nIndex,SocketFlags.None);
// Receive 2 byte response...
nGot = s.Receive(response,2,SocketFlags.None);
if (nGot!=2)
throw new ConnectionException("Bad response received from proxy server.");
if (response[1] != 0x00)
throw new ConnectionException("Bad Usernaem/Password.");
}
// This version only supports connect command.
// UDP and Bind are not supported.
// Send connect request now...
nIndex = 0;
request[nIndex++]=0x05; // version 5.
request[nIndex++]=0x01; // command = connect.
request[nIndex++]=0x00; // Reserve = must be 0x00
if (destIP != null)
{// Destination adress in an IP.
switch(destIP.AddressFamily)
{
case AddressFamily.InterNetwork:
// Address is IPV4 format
request[nIndex++]=0x01;
rawBytes = destIP.GetAddressBytes();
rawBytes.CopyTo(request,nIndex);
nIndex+=(ushort)rawBytes.Length;
break;
case AddressFamily.InterNetworkV6:
// Address is IPV6 format
request[nIndex++]=0x04;
rawBytes = destIP.GetAddressBytes();
rawBytes.CopyTo(request,nIndex);
nIndex+=(ushort)rawBytes.Length;
break;
}
}
else
{// Dest. address is domain name.
request[nIndex++]=0x03; // Address is full-qualified domain name.
request[nIndex++]=Convert.ToByte(destAddress.Length); // length of address.
rawBytes = Encoding.Default.GetBytes(destAddress);
rawBytes.CopyTo(request,nIndex);
nIndex+=(ushort)rawBytes.Length;
}
// using big-edian byte order
byte[] portBytes = BitConverter.GetBytes(destPort);
for (int i=portBytes.Length-1;i>=0;i--)
request[nIndex++]=portBytes[i];
// send connect request.
s.Send(request,nIndex,SocketFlags.None);
s.Receive(response); // Get variable length response...
if (response[1]!=0x00)
throw new ConnectionException(errorMsgs[response[1]]);
// Success Connected...
return s;
}
}
}
『捌』 代理端和客戶端靠什麼連接(網線 還是路由器 還是啥)
CCPROXY 軟代理呀,不需要什麼另外的硬連接。
區域網內如果某台機能上外網,可以在此機上裝個代理軟體ccproxy,
你就可以通過這台機上外網,這台機就是你的代理機,你只要
在瀏覽器里設一下:代理地址,代理埠就可以。
很簡單。
如果你的網路水平高了,你可以在你的機上再裝個代理客戶端proxifierPE2.91,
上外網就更方便了。
『玖』 如何解決代理伺服器客戶端代理上網速度慢
使用代理伺服器,速度取決於伺服器的網速和你與伺服器之間連接的速度,二者只要有一個慢網速就很慢,如果你網速夠快,找一個快的代理就可以了
『拾』 我用java的socket機制編了一個代理伺服器,客戶端已經與代理建立了連接,如何讓代理與web伺服器連接
代理伺服器解析客戶端傳入的數據,得到伺服器ip和埠,然後創建與伺服器的連接。解析代碼如下:(這里只處理了socket v5的情況,Config的常量對應java.net.SocksConsts)
try{
//socketv5
//4byte(5202)@seejava.net.SocksSocketImpl
intlen=dis.read(buffer);
//replyclient
dos.write(newbyte[]{Config.PROTO_VERS,Config.NO_AUTH});
dos.flush();
//read
//PROTO_VERS(1byte)
//CONNECT(1byte)
//0(1byte)
//DOMAIN_NAME/IPV4/IPV6(1byte)DOMAIN_NAME(notconsidernow)
//addr(IPV4:4byte/IPV6:16byte)
//port>>8&0xff(1byte)
//port&0xff(1byte)
len=dis.read(buffer);
byteaddrType=buffer[3];
byte[]applyData=null;
StringserverIp=null;
intserverPort=0;
if(addrType==Config.IPV4){
serverIp=Util.bytes2ipv4(buffer,4,4);
serverPort=buffer[8]<<8|buffer[9];
//setreplydata
applyData=newbyte[10];
applyData[1]=Config.REQUEST_OK;
applyData[3]=Config.IPV4;
for(inti=4;i<10;i++){
//fillip,port
applyData[i]=buffer[i];
}
}elseif(addrType==Config.IPV6){
serverIp=Util.bytes2ipv6(buffer,4,16);
serverPort=buffer[20]<<8|buffer[21];
//setreplydata
applyData=newbyte[6];
applyData[1]=Config.REQUEST_OK;
applyData[3]=Config.IPV6;
applyData[4]=buffer[20];
applyData[5]=buffer[21];
}
//reply
dos.write(applyData);
dos.flush();
//connecttheserver
//serverIp是伺服器ip,serverPort是伺服器埠,用這兩個
//創建與伺服器的socket連接
Socketsocket=newSocket(serverIp,serverPort);
//之後處理客戶端與伺服器的數據交互就用這個socket轉發就行了
//finallysuccess!!!
}catch(Exceptione){
e.printStackTrace();
}