Re: open socket and read file inside Webrtc

2018-07-10 Thread Angelo Mantellini
Hi,

We are modifying the webrtc library to use another transport protocol (based on 
ICN).

The problem is that in this preliminary phase we have configure the socket 
using static parameters inside a file.

The new socket is implemented in a library that communicates via TCP with an 
external daemon.

I want to use IPC (or mojo?), but I don’t have examples about this approach.

 

Thanks for your help

 

Angelo

 

From: Alex Gaynor 
Date: Thursday, July 5, 2018 at 5:44 PM
To: 
Cc: , dev-platform 

Subject: Re: open socket and read file inside Webrtc

 

Can you describe in a bit more detail what you're trying to accomplish?

 

As a general rule, the design of the sandbox is that the content process 
shouldn't/can't access any system resources, and any resource you need should 
be provided via IPC to the parent process.

 

alex

 

On Thu, Jul 5, 2018 at 11:43 AM angelo mantellini  wrote:

Alternatives?

Il Mer 4 Lug 2018, 19:56 Eric Rescorla  ha scritto:

> On Wed, Jul 4, 2018 at 5:24 AM,  wrote:
>
> > Hi,
> > I'm very new with firefox (as developer, of course).
> > I need to open a file and tcp sockets inside webrtc.
> > I read the following link
> > https://wiki.mozilla.org/Security/Sandbox#File_System_Restrictions
> > there is the sandbox that does not permit to open sockets or file
> > descriptors.
> > could you give me the way how I can solve these my problems?
> > Thank you very much
> >
>
> There's no way to open raw sockets inside the web platform
>
> -Ekr
>
>
> > Angelo
> > ___
> > dev-platform mailing list
> > dev-platform@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platform
> >
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-10 Thread angelo mantellini
No, I'm not of irtf Group.
I need to use a version of customized webrtc on Android.
Thank you

Il Ven 6 Lug 2018, 18:23 Nils Ohlmeier  ha scritto:

>
>
> > On Jul 6, 2018, at 08:26, Randell Jesup  wrote:
> >
> >>> On 05/07/2018 10:16, amantell...@gmail.com wrote:
>  I want to open a file inside webrtc core part.
> >>>
> >>> If you could extend the reasons on the why it would allow us to help
> you.
> >>>
> >>> What is your ultimate objective? why do you think you need to open a
> >>> file inside webrtc core?
> >
> >> We are modifying the webrtc library to use another transport protocol
> (based on ICN).
> >> The problem is that in this preliminary phase we have configure the
> socket using static parameters inside a file.
> >> The new socket is implemented in a library that communicates via TCP
> with an external daemon.
> >> I want to use IPC, but I don’t have examples about this approach.
> >
> > If this is just for personal experimentation, you can locally disable
> > the sandbox via about:config, and directly (locally) modify the
> > media/mtransport code to use your transport protocol instead of UDP via
> > IPC to the SocketTransportThread in the main process.
>
> Besides the sandbox you might want to start your locally compiled Firefox
> with ‘./mach run —disable-e10s’, because then it will use this networking
> code
> https://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.h#151
> <
> https://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.h#151
> >
> rather then the IPC based code here
> https://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.h#214
> <
> https://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.h#214
> >
>
> > Note that there's a lot of code that implements ICE to determine what
> > ports are open, etc.  That may complicate what you're doing.
> >
> > If you want to do more than personal/local experimentation, much more
> > extensive discussions and work would be required.
>
> If you are part of the IRTF research group and you are going to be at the
> Montreal meeting it might be the easiest to find me (or someone else from
> Mozilla) to discuss this in person.
>
> Best
>   Nils Ohlmeier
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-06 Thread Nils Ohlmeier


> On Jul 6, 2018, at 08:26, Randell Jesup  wrote:
> 
>>> On 05/07/2018 10:16, amantell...@gmail.com wrote:
 I want to open a file inside webrtc core part.
>>> 
>>> If you could extend the reasons on the why it would allow us to help you.
>>> 
>>> What is your ultimate objective? why do you think you need to open a
>>> file inside webrtc core?
> 
>> We are modifying the webrtc library to use another transport protocol (based 
>> on ICN).
>> The problem is that in this preliminary phase we have configure the socket 
>> using static parameters inside a file.
>> The new socket is implemented in a library that communicates via TCP with an 
>> external daemon.
>> I want to use IPC, but I don’t have examples about this approach.
> 
> If this is just for personal experimentation, you can locally disable
> the sandbox via about:config, and directly (locally) modify the
> media/mtransport code to use your transport protocol instead of UDP via
> IPC to the SocketTransportThread in the main process.

Besides the sandbox you might want to start your locally compiled Firefox with 
‘./mach run —disable-e10s’, because then it will use this networking code 
https://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.h#151
 

rather then the IPC based code here 
https://searchfox.org/mozilla-central/source/media/mtransport/nr_socket_prsock.h#214
 


> Note that there's a lot of code that implements ICE to determine what
> ports are open, etc.  That may complicate what you're doing.
> 
> If you want to do more than personal/local experimentation, much more
> extensive discussions and work would be required.

If you are part of the IRTF research group and you are going to be at the 
Montreal meeting it might be the easiest to find me (or someone else from 
Mozilla) to discuss this in person.

Best
  Nils Ohlmeier


signature.asc
Description: Message signed with OpenPGP
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-06 Thread Randell Jesup
>> On 05/07/2018 10:16, amantell...@gmail.com wrote:
>> > I want to open a file inside webrtc core part.
>> 
>> If you could extend the reasons on the why it would allow us to help you.
>> 
>> What is your ultimate objective? why do you think you need to open a 
>> file inside webrtc core?

>We are modifying the webrtc library to use another transport protocol (based 
>on ICN).
>The problem is that in this preliminary phase we have configure the socket 
>using static parameters inside a file.
>The new socket is implemented in a library that communicates via TCP with an 
>external daemon.
>I want to use IPC, but I don’t have examples about this approach.

If this is just for personal experimentation, you can locally disable
the sandbox via about:config, and directly (locally) modify the
media/mtransport code to use your transport protocol instead of UDP via
IPC to the SocketTransportThread in the main process.

Note that there's a lot of code that implements ICE to determine what
ports are open, etc.  That may complicate what you're doing.

If you want to do more than personal/local experimentation, much more
extensive discussions and work would be required.

-- 
Randell Jesup, Mozilla Corp
remove "news" for personal email
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-06 Thread amantellini
Il giorno giovedì 5 luglio 2018 19:21:51 UTC+2, Jean-Yves Avenard ha scritto:
> Hi
> 
> 
> On 05/07/2018 10:16, amantell...@gmail.com wrote:
> > I want to open a file inside webrtc core part.
> >
> >
> 
> If you could extend the reasons on the why it would allow us to help you.
> 
> What is your ultimate objective? why do you think you need to open a 
> file inside webrtc core?
> 
> Is it because you want to record the streams being sent?
> You want to record some diagnostics?
> 
> Do you want to patch gecko/webrtc directly? Or want to write an extension?
> 
> With the informations you've provided it's not possible to detail an 
> alternative..
> 
> But as Ekr mentioned, you can't do what you describe, and in the future 
> it will be even less possible (should webrtc runs in its own 
> sandbox/process)


Hi,
We are modifying the webrtc library to use another transport protocol (based on 
ICN).
The problem is that in this preliminary phase we have configure the socket 
using static parameters inside a file.
The new socket is implemented in a library that communicates via TCP with an 
external daemon.
I want to use IPC, but I don’t have examples about this approach.
 
Thanks for your help
 
Angelo
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-05 Thread Jean-Yves Avenard

Hi


On 05/07/2018 10:16, amantell...@gmail.com wrote:

I want to open a file inside webrtc core part.




If you could extend the reasons on the why it would allow us to help you.

What is your ultimate objective? why do you think you need to open a 
file inside webrtc core?


Is it because you want to record the streams being sent?
You want to record some diagnostics?

Do you want to patch gecko/webrtc directly? Or want to write an extension?

With the informations you've provided it's not possible to detail an 
alternative..


But as Ekr mentioned, you can't do what you describe, and in the future 
it will be even less possible (should webrtc runs in its own 
sandbox/process)


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-05 Thread Alex Gaynor
Can you describe in a bit more detail what you're trying to accomplish?

As a general rule, the design of the sandbox is that the content process
shouldn't/can't access any system resources, and any resource you need
should be provided via IPC to the parent process.

alex

On Thu, Jul 5, 2018 at 11:43 AM angelo mantellini 
wrote:

> Alternatives?
>
> Il Mer 4 Lug 2018, 19:56 Eric Rescorla  ha scritto:
>
> > On Wed, Jul 4, 2018 at 5:24 AM,  wrote:
> >
> > > Hi,
> > > I'm very new with firefox (as developer, of course).
> > > I need to open a file and tcp sockets inside webrtc.
> > > I read the following link
> > > https://wiki.mozilla.org/Security/Sandbox#File_System_Restrictions
> > > there is the sandbox that does not permit to open sockets or file
> > > descriptors.
> > > could you give me the way how I can solve these my problems?
> > > Thank you very much
> > >
> >
> > There's no way to open raw sockets inside the web platform
> >
> > -Ekr
> >
> >
> > > Angelo
> > > ___
> > > dev-platform mailing list
> > > dev-platform@lists.mozilla.org
> > > https://lists.mozilla.org/listinfo/dev-platform
> > >
> >
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-05 Thread angelo mantellini
Alternatives?

Il Mer 4 Lug 2018, 19:56 Eric Rescorla  ha scritto:

> On Wed, Jul 4, 2018 at 5:24 AM,  wrote:
>
> > Hi,
> > I'm very new with firefox (as developer, of course).
> > I need to open a file and tcp sockets inside webrtc.
> > I read the following link
> > https://wiki.mozilla.org/Security/Sandbox#File_System_Restrictions
> > there is the sandbox that does not permit to open sockets or file
> > descriptors.
> > could you give me the way how I can solve these my problems?
> > Thank you very much
> >
>
> There's no way to open raw sockets inside the web platform
>
> -Ekr
>
>
> > Angelo
> > ___
> > dev-platform mailing list
> > dev-platform@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platform
> >
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-05 Thread amantellini
I want to open a file inside webrtc core part.


Il giorno mercoledì 4 luglio 2018 21:53:22 UTC+2, Adam Roach ha scritto:
> On 7/4/18 7:24 AM, amantell...@gmail.com wrote:
> > Hi,
> > I'm very new with firefox (as developer, of course).
> > I need to open a file and tcp sockets inside webrtc.
> > I read the following link
> > https://wiki.mozilla.org/Security/Sandbox#File_System_Restrictions
> > there is the sandbox that does not permit to open sockets or file 
> > descriptors.
> > could you give me the way how I can solve these my problems?
> > Thank you very much
> 
> For files, you want to use the File API. See 
> https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications
>  
> for a good introduction.
> 
> /a

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-04 Thread Adam Roach

On 7/4/18 7:24 AM, amantell...@gmail.com wrote:

Hi,
I'm very new with firefox (as developer, of course).
I need to open a file and tcp sockets inside webrtc.
I read the following link
https://wiki.mozilla.org/Security/Sandbox#File_System_Restrictions
there is the sandbox that does not permit to open sockets or file descriptors.
could you give me the way how I can solve these my problems?
Thank you very much


For files, you want to use the File API. See 
https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications 
for a good introduction.


/a
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: open socket and read file inside Webrtc

2018-07-04 Thread Eric Rescorla
On Wed, Jul 4, 2018 at 5:24 AM,  wrote:

> Hi,
> I'm very new with firefox (as developer, of course).
> I need to open a file and tcp sockets inside webrtc.
> I read the following link
> https://wiki.mozilla.org/Security/Sandbox#File_System_Restrictions
> there is the sandbox that does not permit to open sockets or file
> descriptors.
> could you give me the way how I can solve these my problems?
> Thank you very much
>

There's no way to open raw sockets inside the web platform

-Ekr


> Angelo
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform