oauth
This commit is contained in:
parent
1b82b7ca97
commit
064aca0fa7
@ -117,6 +117,8 @@ Flags:
|
||||
|
||||
-Z Dual allocation (SSODA draft support).
|
||||
|
||||
-J Use oAuth.
|
||||
|
||||
Options with required values:
|
||||
|
||||
-l Message length (Default: 100 Bytes).
|
||||
|
||||
@ -97,6 +97,11 @@ band_limit_t bps = 0;
|
||||
|
||||
int dual_allocation = 0;
|
||||
|
||||
int oauth = 0;
|
||||
oauth_key_data_raw okdr = {
|
||||
"north","Y2FybGVvbg==",0,0,"SHA-256","AES-256-CBC","","HMAC-SHA-256-128",""
|
||||
};
|
||||
|
||||
//////////////// local definitions /////////////////
|
||||
|
||||
static char Usage[] =
|
||||
@ -130,6 +135,7 @@ static char Usage[] =
|
||||
" -G Generate extra requests (create permissions, channel bind).\n"
|
||||
" -B Random disconnect after a few initial packets.\n"
|
||||
" -Z Dual allocation.\n"
|
||||
" -J Use oAuth.\n"
|
||||
"Options:\n"
|
||||
" -l Message length (Default: 100 Bytes).\n"
|
||||
" -i Certificate file (for secure connections only, optional).\n"
|
||||
@ -204,8 +210,11 @@ int main(int argc, char **argv)
|
||||
|
||||
ns_bzero(local_addr, sizeof(local_addr));
|
||||
|
||||
while ((c = getopt(argc, argv, "a:d:p:l:n:L:m:e:r:u:w:i:k:z:W:C:E:F:o:ZvsyhcxXgtTSAPDNOUHMRIGB")) != -1) {
|
||||
while ((c = getopt(argc, argv, "a:d:p:l:n:L:m:e:r:u:w:i:k:z:W:C:E:F:o:ZvsyhcxXgtTSAPDNOUHMRIGBJ")) != -1) {
|
||||
switch (c){
|
||||
case 'J':
|
||||
oauth = 1;
|
||||
break;
|
||||
case 'a':
|
||||
bps = (band_limit_t)atol(optarg);
|
||||
break;
|
||||
|
||||
@ -86,6 +86,9 @@ extern int dual_allocation;
|
||||
|
||||
extern char origin[STUN_MAX_ORIGIN_SIZE+1];
|
||||
|
||||
extern int oauth;
|
||||
extern oauth_key_data_raw okdr;
|
||||
|
||||
#define is_TCP_relay() (relay_transport == STUN_ATTRIBUTE_TRANSPORT_TCP_VALUE)
|
||||
|
||||
void start_mclient(const char *remote_address, int port,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user