Creates barebones server to respond
When the proxy is requested directly (without an host to pass the request to), we want to respond with something. In burp, you can download the certificate from here. In time, I'd like this to do the same. I'd also like the proxy server to be interacted with via an API - this webserver will eventually deal with that as well although that is a little way off.
This commit is contained in:
parent
a3a48a841e
commit
a91a264a7a
2 changed files with 23 additions and 0 deletions
7
src/webserver.c
Normal file
7
src/webserver.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "webserver.h"
|
||||
|
||||
char* webserverGetResponse( Request *req ){
|
||||
Response *rsp = newResponse();
|
||||
responseSetBody(rsp, "Test", 1);
|
||||
return responseToString(rsp);
|
||||
}
|
16
src/webserver.h
Normal file
16
src/webserver.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#ifndef WEBSERVER_H
|
||||
#define WEBSERVER_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "request.h"
|
||||
#include "response.h"
|
||||
|
||||
char* webserverGetResponse( Request *req );
|
||||
|
||||
#endif /* ifndef WEBSERVER_H
|
||||
|
||||
include "stdlib.h"
|
||||
include "stdio.h"
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue