Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: open exe file Pin
Abhijit Jana11-Oct-09 3:50
professionalAbhijit Jana11-Oct-09 3:50 
QuestionGet IP from IPInterfaceProperties Pin
Johan Martensson11-Oct-09 0:33
Johan Martensson11-Oct-09 0:33 
AnswerRe: Get IP from IPInterfaceProperties Pin
dataminers11-Oct-09 1:58
dataminers11-Oct-09 1:58 
GeneralRe: Get IP from IPInterfaceProperties Pin
Johan Martensson11-Oct-09 4:07
Johan Martensson11-Oct-09 4:07 
Questionwant dll to change pitch of the sound in C#. Pin
bill khan10-Oct-09 22:51
bill khan10-Oct-09 22:51 
QuestionCustom UserControl and the Designer Pin
softwarejaeger10-Oct-09 22:33
softwarejaeger10-Oct-09 22:33 
AnswerRe: Custom UserControl and the Designer Pin
Henry Minute11-Oct-09 1:18
Henry Minute11-Oct-09 1:18 
QuestionUDP SOCKS5 Help [modified] Pin
murktinez10-Oct-09 21:58
murktinez10-Oct-09 21:58 
I'm having alittle trouble with the SOCKS5 protocol. Maybe someone here can help.
http://www.rfc-editor.org/rfc/rfc1928.txt

the initial request consist of 3 bytes
request[0] = 0x05; //SOCKS version
request[1] = 0x01; //number of authentication methods
request[2] = 0x00; //NO AUTHENTICATION REQUIRED

the response contains 2 bytes
response[0] == 0x05; //SOCKS version
response[1] == 0x00; //Authentication method accepted

the next request is 10 bytes
request[0] = 0x05; //SOCKS version
request[1] = 0x03; //command - UDP ASSOCIATE
request[2] = 0x00; //reserved
request[3] = 0x01; //address type - IP V4 - check RFC for other supported types

(destination IP).GetAddressBytes().CopyTo(request, 4); //destination address

int byte1 = (destination Port) / 256;
int byte2 = (destination Port) % 256;

request[8] = (byte)byte1;
request[9] = (byte)byte2;

now this is where im having trouble. with the next response. the first 4 bytes are fine
response[0] == 0x05; //SOCKS version
response[1] == 0x00; //Reply field, 0x00 == success
response[2] == 0x00; //reserved
response[3] == 0x01; //address type ipv4

but with the next 4 bytes its supposed to return an IP address to which im supposed to send udp data to. the bound address, but it returns an ip of 0.0.0.0. then the next two bytes are fine which is the bound port to send the udp data to. now why would it be returning a null ip? am I just suppsoed to use the proxy IP when it comes to UDP?

modified on Sunday, October 11, 2009 4:11 AM

AnswerRe: UDP SOCKS5 Help Pin
murktinez11-Oct-09 7:40
murktinez11-Oct-09 7:40 
Questioninternet explorer on page event hook Pin
nchandra.org10-Oct-09 14:01
nchandra.org10-Oct-09 14:01 
QuestionRefresh PropertyGrid on control resize? Pin
xJorDyx10-Oct-09 12:12
xJorDyx10-Oct-09 12:12 
AnswerRe: Refresh PropertyGrid on control resize? Pin
Mycroft Holmes10-Oct-09 12:32
professionalMycroft Holmes10-Oct-09 12:32 
AnswerRe: Refresh PropertyGrid on control resize? Pin
Henry Minute10-Oct-09 12:34
Henry Minute10-Oct-09 12:34 
QuestionWebBrowser control steal focus on page load Pin
harold aptroot10-Oct-09 12:02
harold aptroot10-Oct-09 12:02 
AnswerRe: WebBrowser control steal focus on page load Pin
OriginalGriff10-Oct-09 22:26
mveOriginalGriff10-Oct-09 22:26 
GeneralRe: WebBrowser control steal focus on page load Pin
harold aptroot10-Oct-09 22:31
harold aptroot10-Oct-09 22:31 
GeneralRe: WebBrowser control steal focus on page load Pin
OriginalGriff10-Oct-09 22:53
mveOriginalGriff10-Oct-09 22:53 
GeneralRe: WebBrowser control steal focus on page load Pin
harold aptroot10-Oct-09 23:07
harold aptroot10-Oct-09 23:07 
GeneralRe: WebBrowser control steal focus on page load Pin
OriginalGriff10-Oct-09 23:27
mveOriginalGriff10-Oct-09 23:27 
GeneralRe: WebBrowser control steal focus on page load Pin
harold aptroot10-Oct-09 23:40
harold aptroot10-Oct-09 23:40 
GeneralRe: WebBrowser control steal focus on page load Pin
harold aptroot11-Oct-09 5:39
harold aptroot11-Oct-09 5:39 
QuestionList tree help! Pin
venomation10-Oct-09 9:56
venomation10-Oct-09 9:56 
AnswerRe: List tree help! Pin
Mycroft Holmes10-Oct-09 12:43
professionalMycroft Holmes10-Oct-09 12:43 
GeneralRe: List tree help! Pin
venomation10-Oct-09 12:59
venomation10-Oct-09 12:59 
AnswerRe: List tree help! Pin
Nicholas Butler11-Oct-09 1:14
sitebuilderNicholas Butler11-Oct-09 1:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.