CSocket über benutzerdefiniertes Proxyscript



  • Keine Ahnung wie das^ gehen soll. Ich brauch das, um über einen Proxy nach "draußen" zu gelangen. Ohne läuft garnichts!



  • Weiß das keiner oder geht das garnicht?

    Brauche das nämlich dringend, sonst läuft mein Programm nicht und (fast) alles war umsonst 😞 😞 😞



  • Aus der MSDN

    How to Connect to a Remote FTP Server
    InternetOpen
    In order to use the WinInet API you must use the InternetOpen function to obtain a handle to a connection to the Internet. The handle returned to the program is needed to do any further work with the SDK.

    For this function to work, you must have an Internet agent or program that will handle the work for you. In this case I will be using the Microsoft Internet Explorer. You will also need to specify the type of access you want and a few optional flags. The sample program uses a proxy server, so you will need to specify the proxy server itself. The function will then return a handle to an Internet session. When you are finished with the connection, you must close it by passing the handle to the InternetCloseHandle function. For example:

    HINTERNET hInternetSession;
    hInternetSession = InternetOpen(
    "Microsoft Internet Explorer", // agent
    INTERNET_OPEN_TYPE_PROXY, // access
    "ftp-gw", // proxy server
    NULL, // defaults
    0); // synchronous
    .
    .
    .
    //Do some processing.
    .
    .
    .
    // Close connection.
    InternetCloseHandle(hInternetSession);

    Habe mit Proxys noch nicht gemacht aber vielleicht hilft dir das mal weiter



  • Oder das hier

    CInternetSession

    Use class CInternetSession to create and initialize a single or several simultaneous Internet sessions and, if necessary, to describe your connection to a proxy server. If your Internet connection must be maintained for the duration of an application, you can create a CInternetSession member of the class CWinApp.



  • Wenn du über einen Socket ins INET willst geht das IMHO nicht über einen Proxy sondern nur per Weiterleitung (Port forward)



  • Danke für die Hilfe, hab das jetzt gelöst!


Anmelden zum Antworten