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
09d4596b
Commit
09d4596b
authored
Dec 10, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add proxy properties to NiceAgent
parent
58c177a7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
1 deletion
+113
-1
agent/agent-priv.h
agent/agent-priv.h
+5
-0
agent/agent.c
agent/agent.c
+88
-1
agent/agent.h
agent/agent.h
+20
-0
No files found.
agent/agent-priv.h
View file @
09d4596b
...
...
@@ -74,6 +74,11 @@ struct _NiceAgent
GTimeVal
next_check_tv
;
/**< property: next conncheck timestamp */
gchar
*
stun_server_ip
;
/**< property: STUN server IP */
guint
stun_server_port
;
/**< property: STUN server port */
gchar
*
proxy_ip
;
/**< property: Proxy server IP */
guint
proxy_port
;
/**< property: Proxy server port */
NiceProxyType
proxy_type
;
/**< property: Proxy type */
gchar
*
proxy_username
;
/**< property: Proxy username */
gchar
*
proxy_password
;
/**< property: Proxy password */
gboolean
controlling_mode
;
/**< property: controlling-mode */
guint
timer_ta
;
/**< property: timer Ta */
guint
max_conn_checks
;
/**< property: max connectivity checks */
...
...
agent/agent.c
View file @
09d4596b
...
...
@@ -88,7 +88,12 @@ enum
PROP_CONTROLLING_MODE
,
PROP_FULL_MODE
,
PROP_STUN_PACING_TIMER
,
PROP_MAX_CONNECTIVITY_CHECKS
PROP_MAX_CONNECTIVITY_CHECKS
,
PROP_PROXY_TYPE
,
PROP_PROXY_IP
,
PROP_PROXY_PORT
,
PROP_PROXY_USERNAME
,
PROP_PROXY_PASSWORD
};
...
...
@@ -301,6 +306,48 @@ nice_agent_class_init (NiceAgentClass *klass)
0
,
/* default set in init */
G_PARAM_READWRITE
));
g_object_class_install_property
(
gobject_class
,
PROP_PROXY_IP
,
g_param_spec_string
(
"proxy-ip"
,
"Proxy server IP"
,
"The proxy server used to bypass a proxy firewall"
,
NULL
,
G_PARAM_READWRITE
));
g_object_class_install_property
(
gobject_class
,
PROP_PROXY_PORT
,
g_param_spec_uint
(
"proxy-port"
,
"Proxy server port"
,
"The Proxy server used to bypass a proxy firewall"
,
1
,
65536
,
1
,
G_PARAM_READWRITE
));
g_object_class_install_property
(
gobject_class
,
PROP_PROXY_TYPE
,
g_param_spec_uint
(
"proxy-type"
,
"Type of proxy to use"
,
"The type of proxy set in the proxy-ip property"
,
NICE_PROXY_TYPE_NONE
,
NICE_PROXY_TYPE_LAST
,
NICE_PROXY_TYPE_NONE
,
G_PARAM_READWRITE
));
g_object_class_install_property
(
gobject_class
,
PROP_PROXY_USERNAME
,
g_param_spec_string
(
"proxy-username"
,
"Proxy server username"
,
"The username used to authenticate with the proxy"
,
NULL
,
G_PARAM_READWRITE
));
g_object_class_install_property
(
gobject_class
,
PROP_PROXY_PASSWORD
,
g_param_spec_string
(
"proxy-password"
,
"Proxy server password"
,
"The password used to authenticate with the proxy"
,
NULL
,
G_PARAM_READWRITE
));
/* install signals */
/**
...
...
@@ -536,6 +583,26 @@ nice_agent_get_property (
/* XXX: should we prune the list of already existing checks? */
break
;
case
PROP_PROXY_IP
:
g_value_set_string
(
value
,
agent
->
proxy_ip
);
break
;
case
PROP_PROXY_PORT
:
g_value_set_uint
(
value
,
agent
->
proxy_port
);
break
;
case
PROP_PROXY_TYPE
:
g_value_set_uint
(
value
,
agent
->
proxy_type
);
break
;
case
PROP_PROXY_USERNAME
:
g_value_set_string
(
value
,
agent
->
proxy_username
);
break
;
case
PROP_PROXY_PASSWORD
:
g_value_set_string
(
value
,
agent
->
proxy_password
);
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
property_id
,
pspec
);
}
...
...
@@ -606,6 +673,26 @@ nice_agent_set_property (
agent
->
max_conn_checks
=
g_value_get_uint
(
value
);
break
;
case
PROP_PROXY_IP
:
agent
->
proxy_ip
=
g_value_dup_string
(
value
);
break
;
case
PROP_PROXY_PORT
:
agent
->
proxy_port
=
g_value_get_uint
(
value
);
break
;
case
PROP_PROXY_TYPE
:
agent
->
proxy_type
=
g_value_get_uint
(
value
);
break
;
case
PROP_PROXY_USERNAME
:
agent
->
proxy_username
=
g_value_dup_string
(
value
);
break
;
case
PROP_PROXY_PASSWORD
:
agent
->
proxy_password
=
g_value_dup_string
(
value
);
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
property_id
,
pspec
);
}
...
...
agent/agent.h
View file @
09d4596b
...
...
@@ -228,6 +228,26 @@ typedef enum
NICE_COMPATIBILITY_LAST
=
NICE_COMPATIBILITY_MSN
}
NiceCompatibility
;
/**
* NiceProxyType:
* @NICE_PROXY_TYPE_NONE: Do not use a proxy
* @NICE_PROXY_TYPE_SOCKS5: Use a SOCKS5 proxy
* @NICE_PROXY_TYPE_HTTP: Use an HTTP proxy
* @NICE_PROXY_TYPE_LAST: Dummy last proxy type
*
* An enum to specify which proxy type to use for relaying.
* Note that the proxies will only be used with TCP TURN relaying.
* See #NiceAgent:proxy-type
*/
typedef
enum
{
NICE_PROXY_TYPE_NONE
=
0
,
NICE_PROXY_TYPE_SOCKS5
,
NICE_PROXY_TYPE_HTTP
,
NICE_PROXY_TYPE_LAST
=
NICE_PROXY_TYPE_HTTP
,
}
NiceProxyType
;
/**
* NiceAgentRecvFunc:
* @agent: The #NiceAgent Object
...
...
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