Understood that we can't use /mount parameter as login.
I tried to use password as login/password in same place, divided by ":"
symbol, but this also doesn't work :(
I mean if user will define "login:password" in his streamer, we would be
able to find user by login & by password.
I can see data (login) before ":" symbol, but everything after it is
dropped (i can't get password).

Is there a way to retrieve as login, as password in one field? We can't
uderstand who connects to harbour just using password (two users can have
same passwords)

2013/2/6 Alexander <truenr...@gmail.com>

> Hello,
>
> After i've added id="harbor" parameter is started to work (it prints
> user,password and lets me to stream).
>
> But strange thing:
> 1) It does not allow me to login with different login (i can login only
> with /test, as defined in harbour.live)
>    Is it possible to allow users to enter their login to mount name field
> in streamers?
>
> 2) It always prints "source" for "user" parameter in userauth function.
>    Is it possible to get there user login (that he has defined in "/mount"
> field in streamer)?
>
>
> def userauth(user,password) =
>>     print(user)     # Always prints "source"
>>     print(password) # Prints correct password i've specified in EdCast
>>     true
>> end
>> live = input.harbor(id="harbor", auth=userauth, port=8080, "test")
>
>
>
> 2013/2/6 Alexander <truenr...@gmail.com>
>
>> Hello,
>>
>> i've used following fantastic auth script to try to login to my harbour
>> with custom login & password (that are inside of php file):
>>
>> def userauth(user,password) =
>>>   ret = get_process_lines("/home/test/scripts/harbour/phpauth.php
>>> --user='#{user}' --password='#{password}'")
>>>   ret = list.hd(ret)
>>>   if ret == "true" then
>>>     true
>>>   else
>>>     false
>>>   end
>>> end
>>
>>
>> But it didn't work for me. Then i've changed this method to
>>
>> def userauth(user,password) =
>>>   print(user)
>>>   print(password)
>>>   true
>>> end
>>
>>
>> Also, it does not print anything and does not let me broadcast on harbour.
>> Perhaps i'm doing smth wrong?
>> I am spcifying this parameter in input.harbour method following way:
>>
>> live = input.harbor("test-harbor", auth=userauth, port=8080)
>>
>>
>> P.S. Full .liq config is below:
>>
>> #!/usr/bin/liquidsoap
>>> set("log.file.path","/home/test/scripts/harbour/script.log")
>>> set("log.stdout", true)
>>> set("server.telnet", true)
>>> set("harbor.bind_addr","0.0.0.0")
>>> # Custom user authentication command
>>> def userauth(user,password) =
>>>   ret = get_process_lines("/home/test/scripts/harbour/phpauth.php
>>> --user='#{user}' --password='#{password}'")
>>>   ret = list.hd(ret)
>>>   if ret == "true" then
>>>     true
>>>   else
>>>     false
>>>   end
>>> end
>>> # Security track
>>> security = single("/home/test/data/security.mp3")
>>> # Live
>>> live = input.harbor("test-harbor", auth=userauth, port=8080)
>>> # Prepare radio source
>>> radio = fallback(track_sensitive=false, [live,security])
>>> # Output mp3
>>> output.icecast(%mp3,
>>>   host="localhost",port=80,password="hackme",
>>>   mount="test-1",radio)
>>>
>>> # Output vorbis
>>> output.icecast(%vorbis,
>>>   host="localhost",port=80,password="hackme",
>>>   mount="test-2",radio)
>>
>> --
>> Kind regards,
>> Alexander.
>>
>
>
>
> --
> Kind regards,
> Alexander.
>



-- 
Kind regards,
Alexander.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to