Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
b21caf2e
Commit
b21caf2e
authored
Dec 19, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding HTTP proxy support
parent
16d1a06d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
481 additions
and
8 deletions
+481
-8
agent/agent.c
agent/agent.c
+12
-8
socket/Makefile.am
socket/Makefile.am
+2
-0
socket/http.c
socket/http.c
+411
-0
socket/http.h
socket/http.h
+55
-0
socket/socket.h
socket/socket.h
+1
-0
No files found.
agent/agent.c
View file @
b21caf2e
...
...
@@ -918,14 +918,18 @@ priv_add_new_candidate_discovery_turn (NiceAgent *agent,
nice_address_set_port
(
&
proxy_server
,
agent
->
proxy_port
);
socket
=
nice_tcp_bsd_socket_new
(
agent
,
component
->
ctx
,
&
proxy_server
);
if
(
socket
&&
agent
->
proxy_type
==
NICE_PROXY_TYPE_SOCKS5
)
{
socket
=
nice_socks5_socket_new
(
socket
,
&
turn
->
server
,
agent
->
proxy_username
,
agent
->
proxy_password
);
}
else
{
/* TODO add HTTP support */
nice_socket_free
(
socket
);
socket
=
NULL
;
if
(
socket
)
{
if
(
agent
->
proxy_type
==
NICE_PROXY_TYPE_SOCKS5
)
{
socket
=
nice_socks5_socket_new
(
socket
,
&
turn
->
server
,
agent
->
proxy_username
,
agent
->
proxy_password
);
}
else
if
(
agent
->
proxy_type
==
NICE_PROXY_TYPE_HTTP
){
socket
=
nice_http_socket_new
(
socket
,
&
turn
->
server
,
agent
->
proxy_username
,
agent
->
proxy_password
);
}
else
{
/* TODO add HTTP support */
nice_socket_free
(
socket
);
socket
=
NULL
;
}
}
}
...
...
socket/Makefile.am
View file @
b21caf2e
...
...
@@ -30,6 +30,8 @@ libsocket_la_SOURCES = \
pseudossl.c
\
socks5.h
\
socks5.c
\
http.h
\
http.c
\
turn.h
\
turn.c
\
tcp-turn.h
\
...
...
socket/http.c
0 → 100644
View file @
b21caf2e
This diff is collapsed.
Click to expand it.
socket/http.h
0 → 100644
View file @
b21caf2e
/*
* This file is part of the Nice GLib ICE library.
*
* (C) 2006, 2007 Collabora Ltd.
* Contact: Dafydd Harries
* (C) 2006, 2007 Nokia Corporation. All rights reserved.
* Contact: Kai Vehmanen
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Nice GLib ICE library.
*
* The Initial Developers of the Original Code are Collabora Ltd and Nokia
* Corporation. All Rights Reserved.
*
* Contributors:
* Dafydd Harries, Collabora Ltd.
*
* Alternatively, the contents of this file may be used under the terms of the
* the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
* case the provisions of LGPL are applicable instead of those above. If you
* wish to allow use of your version of this file only under the terms of the
* LGPL and not to allow others to use your version of this file under the
* MPL, indicate your decision by deleting the provisions above and replace
* them with the notice and other provisions required by the LGPL. If you do
* not delete the provisions above, a recipient may use your version of this
* file under either the MPL or the LGPL.
*/
#ifndef _HTTP_H
#define _HTTP_H
#include "socket.h"
#include "agent.h"
G_BEGIN_DECLS
NiceSocket
*
nice_http_socket_new
(
NiceSocket
*
base_socket
,
NiceAddress
*
addr
,
gchar
*
username
,
gchar
*
password
);
G_END_DECLS
#endif
/* _HTTP_H */
socket/socket.h
View file @
b21caf2e
...
...
@@ -86,6 +86,7 @@ nice_socket_free (NiceSocket *sock);
#include "tcp-bsd.h"
#include "pseudossl.h"
#include "socks5.h"
#include "http.h"
#include "turn.h"
#include "tcp-turn.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment