From f82c625972c95527b33a2b6f7283368f0344e02b Mon Sep 17 00:00:00 2001 From: user Date: Sun, 7 Jun 2015 04:35:38 +0000 Subject: [PATCH] Updated profiles for network --- profile.go | 15 +++++++++++++++ profiles/evince.json | 2 +- profiles/gajim.json | 7 +------ profiles/icedove.json | 2 +- profiles/iceweasel.json | 2 +- profiles/liferea.json | 2 +- profiles/pidgin.json | 2 +- profiles/pond.json | 2 +- profiles/torbrowser-launcher.json | 2 +- profiles/xchat.json | 2 +- 10 files changed, 24 insertions(+), 14 deletions(-) diff --git a/profile.go b/profile.go index bb5807f..0a17bc8 100644 --- a/profile.go +++ b/profile.go @@ -32,6 +32,8 @@ type Profile struct { XServer XServerConf // List of environment variables Environment []EnvVar + // Networking + Networking NetworkProfile } type XServerConf struct { @@ -59,6 +61,19 @@ type EnvVar struct { Value string } +// Container network definition +type NetworkProfile struct { + // One of empty, host, bridge + Nettype string + + // Name of the bridge to attach to + //Bridge string + + // List of Sockets we want to attach to the jail + // Applies to Nettype: bridge and empty only + //Sockets []nsnat.ConfigSocket +} + const defaultProfileDirectory = "/var/lib/oz/cells.d" var loadedProfiles []*Profile diff --git a/profiles/evince.json b/profiles/evince.json index ad56912..707211c 100644 --- a/profiles/evince.json +++ b/profiles/evince.json @@ -5,7 +5,7 @@ , "enable_tray": true , "tray_icon":"/usr/share/icons/hicolor/48x48/apps/evince.png" } -, "network":{ +, "networking":{ "nettype":"empty" } , "whitelist": [ diff --git a/profiles/gajim.json b/profiles/gajim.json index 758a011..e5aa769 100644 --- a/profiles/gajim.json +++ b/profiles/gajim.json @@ -6,15 +6,10 @@ , "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/gajim.svg" , "disable_audio":true } -, "network":{ +, "networking":{ "nettype":"empty" , "sockets": [ {"nettype":"client", "proto":"tcp", "port":9050} - , {"nettype":"client", "destination": "xmpp.lalonde.me", "proto":"tcp", "port":5222} - , {"nettype":"client", "destination": "xmpp.lalonde.me", "proto":"tcp", "port":5269} - , {"nettype":"client", "destination": "xmpp.lalonde.me", "proto":"tcp", "port":5000} - , {"nettype":"client", "destination": "xmpp.lalonde.me", "proto":"tcp", "port":5280} - , {"nettype":"client", "destination": "xmpp.lalonde.me", "proto":"tcp", "port":5281} ] } , "whitelist": [ diff --git a/profiles/icedove.json b/profiles/icedove.json index 242cbfd..2c5db0b 100644 --- a/profiles/icedove.json +++ b/profiles/icedove.json @@ -6,7 +6,7 @@ , "tray_icon": "/usr/share/icons/hicolor/scalable/apps/icedove.svg" , "disable_audio": true } -, "network":{ +, "networking":{ "nettype":"bridge" , "sockets": [ {"nettype":"client", "proto":"tcp", "port":9050} diff --git a/profiles/iceweasel.json b/profiles/iceweasel.json index 6e818ec..83420ed 100644 --- a/profiles/iceweasel.json +++ b/profiles/iceweasel.json @@ -5,7 +5,7 @@ , "enable_tray": true , "tray_icon":"/usr/share/icons/hicolor/scalable/apps/iceweasel.svg" } -, "network":{ +, "networking":{ "nettype":"bridge" , "sockets": [ {"nettype":"client", "proto":"tcp", "port":9050} diff --git a/profiles/liferea.json b/profiles/liferea.json index 97929dc..3c0830f 100644 --- a/profiles/liferea.json +++ b/profiles/liferea.json @@ -7,7 +7,7 @@ , "tray_icon":"/usr/share/icons/hicolor/scalable/apps/liferea.svg" , "_tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/liferea.svg" } -, "network":{ +, "networking":{ "nettype":"bridge" , "sockets": [ {"nettype":"client", "proto":"tcp", "port":9050} diff --git a/profiles/pidgin.json b/profiles/pidgin.json index 3db5035..23518f4 100644 --- a/profiles/pidgin.json +++ b/profiles/pidgin.json @@ -5,7 +5,7 @@ , "enable_tray": true , "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/pidgin-menu.svg" } -, "network":{ +, "networking":{ "nettype":"bridge" } , "whitelist": [ diff --git a/profiles/pond.json b/profiles/pond.json index 50df8ef..44d00a2 100644 --- a/profiles/pond.json +++ b/profiles/pond.json @@ -7,7 +7,7 @@ , "window_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/office-mail.svg" , "disable_audio":true } -, "network":{ +, "networking":{ "nettype":"empty" , "sockets": [ {"nettype":"client", "proto":"tcp", "port":9050} diff --git a/profiles/torbrowser-launcher.json b/profiles/torbrowser-launcher.json index 7d919fd..2764f64 100644 --- a/profiles/torbrowser-launcher.json +++ b/profiles/torbrowser-launcher.json @@ -8,7 +8,7 @@ , "disable_clipboard": false , "tray_icon":"/usr/share/pixmaps/torbrowser80.xpm" } -, "network":{ +, "networking":{ "nettype":"empty" , "sockets": [ {"nettype":"client", "proto":"tcp", "port":9050} diff --git a/profiles/xchat.json b/profiles/xchat.json index ed80311..c1f65d0 100644 --- a/profiles/xchat.json +++ b/profiles/xchat.json @@ -6,7 +6,7 @@ , "tray_icon": "/usr/share/icons/gnome-colors-common/scalable/apps/xchat.svg" , "disable_audio": true } -, "network":{ +, "networking":{ "nettype":"empty" , "sockets": [ {"nettype":"client", "destination": "10.10.0.90", "proto":"tcp", "port":57000}