Updated profiles for network

master
xSmurf 10 years ago
parent 3b6169d8df
commit 526d69c38c

@ -32,6 +32,8 @@ type Profile struct {
XServer XServerConf XServer XServerConf
// List of environment variables // List of environment variables
Environment []EnvVar Environment []EnvVar
// Networking
Networking NetworkProfile
} }
type XServerConf struct { type XServerConf struct {
@ -59,6 +61,19 @@ type EnvVar struct {
Value string 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" const defaultProfileDirectory = "/var/lib/oz/cells.d"
var loadedProfiles []*Profile var loadedProfiles []*Profile

@ -5,7 +5,7 @@
, "enable_tray": true , "enable_tray": true
, "tray_icon":"/usr/share/icons/hicolor/48x48/apps/evince.png" , "tray_icon":"/usr/share/icons/hicolor/48x48/apps/evince.png"
} }
, "network":{ , "networking":{
"nettype":"empty" "nettype":"empty"
} }
, "whitelist": [ , "whitelist": [

@ -6,15 +6,10 @@
, "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/gajim.svg" , "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/gajim.svg"
, "disable_audio":true , "disable_audio":true
} }
, "network":{ , "networking":{
"nettype":"empty" "nettype":"empty"
, "sockets": [ , "sockets": [
{"nettype":"client", "proto":"tcp", "port":9050} {"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": [ , "whitelist": [

@ -6,7 +6,7 @@
, "tray_icon": "/usr/share/icons/hicolor/scalable/apps/icedove.svg" , "tray_icon": "/usr/share/icons/hicolor/scalable/apps/icedove.svg"
, "disable_audio": true , "disable_audio": true
} }
, "network":{ , "networking":{
"nettype":"bridge" "nettype":"bridge"
, "sockets": [ , "sockets": [
{"nettype":"client", "proto":"tcp", "port":9050} {"nettype":"client", "proto":"tcp", "port":9050}

@ -5,7 +5,7 @@
, "enable_tray": true , "enable_tray": true
, "tray_icon":"/usr/share/icons/hicolor/scalable/apps/iceweasel.svg" , "tray_icon":"/usr/share/icons/hicolor/scalable/apps/iceweasel.svg"
} }
, "network":{ , "networking":{
"nettype":"bridge" "nettype":"bridge"
, "sockets": [ , "sockets": [
{"nettype":"client", "proto":"tcp", "port":9050} {"nettype":"client", "proto":"tcp", "port":9050}

@ -7,7 +7,7 @@
, "tray_icon":"/usr/share/icons/hicolor/scalable/apps/liferea.svg" , "tray_icon":"/usr/share/icons/hicolor/scalable/apps/liferea.svg"
, "_tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/liferea.svg" , "_tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/liferea.svg"
} }
, "network":{ , "networking":{
"nettype":"bridge" "nettype":"bridge"
, "sockets": [ , "sockets": [
{"nettype":"client", "proto":"tcp", "port":9050} {"nettype":"client", "proto":"tcp", "port":9050}

@ -5,7 +5,7 @@
, "enable_tray": true , "enable_tray": true
, "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/pidgin-menu.svg" , "tray_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/pidgin-menu.svg"
} }
, "network":{ , "networking":{
"nettype":"bridge" "nettype":"bridge"
} }
, "whitelist": [ , "whitelist": [

@ -7,7 +7,7 @@
, "window_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/office-mail.svg" , "window_icon":"/usr/share/icons/gnome-colors-common/scalable/apps/office-mail.svg"
, "disable_audio":true , "disable_audio":true
} }
, "network":{ , "networking":{
"nettype":"empty" "nettype":"empty"
, "sockets": [ , "sockets": [
{"nettype":"client", "proto":"tcp", "port":9050} {"nettype":"client", "proto":"tcp", "port":9050}

@ -8,7 +8,7 @@
, "disable_clipboard": false , "disable_clipboard": false
, "tray_icon":"/usr/share/pixmaps/torbrowser80.xpm" , "tray_icon":"/usr/share/pixmaps/torbrowser80.xpm"
} }
, "network":{ , "networking":{
"nettype":"empty" "nettype":"empty"
, "sockets": [ , "sockets": [
{"nettype":"client", "proto":"tcp", "port":9050} {"nettype":"client", "proto":"tcp", "port":9050}

@ -6,7 +6,7 @@
, "tray_icon": "/usr/share/icons/gnome-colors-common/scalable/apps/xchat.svg" , "tray_icon": "/usr/share/icons/gnome-colors-common/scalable/apps/xchat.svg"
, "disable_audio": true , "disable_audio": true
} }
, "network":{ , "networking":{
"nettype":"empty" "nettype":"empty"
, "sockets": [ , "sockets": [
{"nettype":"client", "destination": "10.10.0.90", "proto":"tcp", "port":57000} {"nettype":"client", "destination": "10.10.0.90", "proto":"tcp", "port":57000}

Loading…
Cancel
Save