Server/cider: Unterschied zwischen den Versionen

Aus C3D2
Zur Navigation springen Zur Suche springen
K (→‎MPD: für mehr (besseres) PulseAudio)
Zeile 73: Zeile 73:


<source lang="bash">//feile/space  /feile_space  cifs  credentials=/.feile_space_smbcredentials,uid=1002,gid=1002,iocharset=utf8  0  0</source>
<source lang="bash">//feile/space  /feile_space  cifs  credentials=/.feile_space_smbcredentials,uid=1002,gid=1002,iocharset=utf8  0  0</source>
== PulseAudio ==
[http://www.freedesktop.org/wiki/Software/PulseAudio/ PulseAudio]
Mit [http://freedesktop.org/software/pulseaudio/pavucontrol/ pavucontrol] kann bequem die Lautstärke geregelt werden.
<source lang="bash">PULSE_SERVER=cider pavucontrol</source>


[[Kategorie:Infrastruktur]]
[[Kategorie:Infrastruktur]]

Version vom 26. Februar 2014, 22:02 Uhr

SaferSharing

To avoid legal steps because you are hosting to everyone:

  • get nginx with auth_base
  • proxy around
  • modify your fw a bit

config nginx

as root

vi /etc/nginx/sites-available/default
cat /etc/nginx/sites-available/default
server {
   listen 80 default_server;
   listen [::]:80 default_server ipv6only=on;

   root /usr/share/nginx/html;
   index index.html index.htm;

   # Make site accessible from http://localhost/
   server_name localhost;

   location / {
       auth_basic               "Sharing is Caring";
       auth_basic_user_file     /etc/nginx/htpasswd;
       proxy_pass               http://localhost:8000;
       proxy_buffering          off;
   }
}
vi /etc/nginx/htpasswd
cat /etc/nginx/htpasswd
user:yoursavepassword

In addition we used

openssl passwd -crypt yoursupersafepassword

instead of plaintext password.

sharing2 conf

as user

vi /path/to/sharing2/main.hs
cat /path/to/sharing2/main.hs
main :: IO ()
main = app >>=
       runSettings (defaultSettings
                   { settingsHost = HostIPv6
                   , settingsPort = 8000
                   , ...
                   })

modify iptables

as root

iptables -t filter -A INPUT ! -s 127.0.0.1 -p tcp --dport 8000 -j DROP
ip6tables -t filter -A INPUT ! -s ::1 -p tcp --dport 8000 -j DROP

Na toll, aber wie ist der Zugang zu Cider nun?

wie auf allen anderen Maschinen auch

MPD

Music Player Daemon (MPD) mit ncmpcpp

ssh k-ot@cider
  • ncmpcpp ausführen
  • Quelle für Musik ist das eingebundene Verzeichnis (SMB) von feile.
//feile/space   /feile_space   cifs   credentials=/.feile_space_smbcredentials,uid=1002,gid=1002,iocharset=utf8   0   0

PulseAudio

PulseAudio

Mit pavucontrol kann bequem die Lautstärke geregelt werden.

PULSE_SERVER=cider pavucontrol