Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#67670 - 06/02/2002 04:16 (HiJack?) Streaming Internet AND Intranet Simult?
Fogduck
member

Registered: 06/06/2000
Posts: 199
Loc: BC
(descriptive non-leading subject line courtesy Explicit Subject Line Generator 0.1b1)

Now that I've broken down and finally put a router between my machines and my broadband connection, everybody on my network can now enjoy browsing and streaming my music (a la HiJack! w00t!) collection over the LAN.

However, I've got a neighbor who I'd like to allow to stream from my player at the same time, and although I can forward all port 80 requests to the empeg and browse from outside our LAN and download individual tracks, the playlist that HiJack builds uses the only IP address it knows, which is internal.

Barring the other reasons I may not want to expose my empeg to the public Internet for now is there anything that can be done, or streaming handled differently to allow one to stream both internally and globally?

I don't expect anyone to bust a nut over it -- Intranet streaming alone satisfies a big wish-list ittem of mine already -- but, thoughts? VPN?
_________________________
- - - MK2 #141 12GB Queue #5723 (SOLD) MK2a 30GB + grn + tuner + blk empeg case

Top
#67671 - 06/02/2002 04:58 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: Fogduck]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
If you are using a linux box as router, you can setup portforwarding to get the desired result :

# modprobe ip_masq_portfw
# ipmasqadm portfw -a -P tcp -L [internet IP] 80 -R [empeg IP] 80
_________________________
Frank van Gestel

Top
#67672 - 06/02/2002 05:35 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: fvgestel]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Yeah, but the problem is that Hijack returns the playlist containing the internal IP. No amount of routing/holes in firewalls is going to get around that.

It really ought to use the details from the Host field in the HTTP request. You listening, Mark?
_________________________
-- roger

Top
#67673 - 06/02/2002 05:51 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: Roger]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
Or just use no hostname/ip-addres in any of the links, just relative ones. The webbrowser is responsible for sending the request to the same ip-address the document came from.
The host-field in the request header should/could be used for virtual hosts. This way you could set accesrestrictions based on the accessed IP-address...
_________________________
Frank van Gestel

Top
#67674 - 06/02/2002 05:59 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: Roger]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
- No amount of routing/holes in firewalls is going to get around that. -

An http-proxy-server on the router should suffice. the empeg's IP is known and addressable by the proxy. It would require some configuration in the browser though
_________________________
Frank van Gestel

Top
#67675 - 06/02/2002 06:38 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: fvgestel]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Yeah, but you've _still_ got to fix the problem that the wrong IP appears in the URLs in the playlist response. That's all I'm saying.

You can't leave the hostname out -- Winamp playlists aren't relative to anything. You need the whole lot in there. The easiest way to do this is to put the 'Host' field in there as a prefix.
_________________________
-- roger

Top
#67676 - 06/02/2002 07:55 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: Roger]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
You're absolutely right. I've just looked in the code of displayserver and this is the only place where I use a hostname in the URLs. Mediaplayer over proxy should work I think, as it uses IE's proxy settings. I still think it's rather strange that winamp soesn't support HTTP-proxy's

CORRECTION : winamp does support HTTP-proxy, so theoretically it should work as described earlier...


Edited by fvgestel (06/02/2002 07:59)
_________________________
Frank van Gestel

Top
#67677 - 06/02/2002 08:49 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: fvgestel]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Ah, OK. I thought you were saying that an HTTP proxy instead of a hole would just cause it to magically work. I didn't think you were advocating configuring Winamp to use that proxy.

Anyway, that's clear now: Either set up a proxy, and point Winamp at it; or hassle Mark until he outputs the URLs correctly.
_________________________
-- roger

Top
#67678 - 06/02/2002 10:27 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: Roger]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
>It really ought to use the details from the Host field
>in the HTTP request. You listening, Mark?

Yeah, you're 100% correct. I just used IP address at first to avoid problems with unreliable name servers and whatnot: I didn't want to have to debug people's setups while debugging the server.

But now that the server is working well, I can safely switch over to using the Host: field, falling back to IP address if Host: is not set (like when I use "telnet xxxx 80" to test the server).

FITNR.

Top
#67679 - 06/02/2002 10:30 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: fvgestel]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Frank, what header fields does DisplayServer set when returning a .m3u playlist? Can you send me a complete sample response to an m3u request, including HTTP headers?

I'm trying to get the playlist server to work with as many players as possible, and perhaps you've got some tricks I haven't found yet!

Thanks.

Top
#67680 - 06/02/2002 12:36 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: mlord]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Why not just use relative URLs and leave the hostname/IP address off altogether? Am I missing something obvious?
_________________________
Bitt Faulk

Top
#67681 - 06/02/2002 12:38 Re: (HiJack?) Streaming Internet AND Intranet Simult? [Re: Fogduck]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Okay, try it now with Hijack v184. It now uses the "Host:" field from the HTTP GET request, rather than the empeg's IP address (unless the host field was missing) in the .m3u playlists.

-ml

Top
#67682 - 06/02/2002 12:39 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: wfaulk]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
>Why not just use relative URLs and leave the hostname/IP
>address off altogether? Am I missing something obvious?

Yeah, we're talking about the .m3u playlist files, which have no relative path to reference from. They need the whole deal, hostname and all. Don't they?

Top
#67683 - 06/02/2002 12:45 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: mlord]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Good point. Duh.
_________________________
Bitt Faulk

Top
#67684 - 06/02/2002 13:01 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: wfaulk]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Can you send me an m3u (with HTTP header) as would be generated by DisplayServer?

Thanks

Top
#67685 - 06/02/2002 13:09 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: mlord]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Ummmm. I've never even seen, much less used, DisplayServer.
_________________________
Bitt Faulk

Top
#67686 - 06/02/2002 15:10 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: mlord]
Terminator
old hand

Registered: 12/01/2000
Posts: 1079
Loc: Dallas, TX
Mark, here is a displayserver setup. http://empeg.dyndns.org:81/

Sean

Top
#67687 - 07/02/2002 00:08 Re: (HiJack?) Streaming Internet AND Intranet Simult? [Re: mlord]
Fogduck
member

Registered: 06/06/2000
Posts: 199
Loc: BC
> Okay, try it now with Hijack v184. It now uses the "Host:"
> field from the HTTP GET request, rather than the empeg's IP
> address (unless the host field was missing) in the .m3u
> playlists.

BINGO! (I didnt get to try it until 185)

(smacks forehead) I totally forgot the complete request header would contain the external IP.

Mark -- this is W I C K E D. My fiancee is streaming from within our LAN, my buddy across town is streaming from outside... w00t!

Now maybe I'll run out and buy a couple 802.11 access points and an inverter for the car...
_________________________
- - - MK2 #141 12GB Queue #5723 (SOLD) MK2a 30GB + grn + tuner + blk empeg case

Top
#67688 - 07/02/2002 07:25 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: mlord]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
Mark,
this is a standard HTTP-request for an m3u in displayserver :


GET /ds-bin/getfid?output=m3u&savefile=ttt&fid=9ed HTTP/1.0
Host: empeg

HTTP/1.1 200 OK
Server: EmpegCar DisplayServer/1.1 (Linux)
Connection: Keep-Alive
Content-Type: audio/x-mpegurl

http://empeg/ds-bin/getfid?output=m3u&fid=9ee
http://empeg/ds-bin/getfid?output=m3u&fid=9f6
http://empeg/ds-bin/getfid?output=m3u&fid=a09
http://empeg/ds-bin/getfid?output=m3u&fid=a19
http://empeg/ds-bin/getfid?output=m3u&fid=a28
Connection closed by foreign host.
_________________________
Frank van Gestel

Top
#67689 - 07/02/2002 08:11 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: fvgestel]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Mmm... okay, thanks.

Nothing really different there from Hijack (except the "Keep-Alive").

I wonder what other header fields are expected by MS MediaPlayer and Apple iTunes?

-ml

Top
#67690 - 07/02/2002 08:21 Re: (HiJack?) Streaming Internet AND Intranet Simu [Re: mlord]
fvgestel
old hand

Registered: 12/08/2000
Posts: 702
Loc: Netherlands
The keep-alive header is probably not needed.

WIndows users have to configure windows to open their MP3-player when a file with content-type audio/x-mpegurl is received:
In explorermenu :
View -> Options -> File Types
_________________________
Frank van Gestel

Top