# File lib/openshift-origin-node/model/unix_user.rb, line 592
    def initialize_openshift_port_proxy
      notify_observers(:before_initialize_openshift_port_proxy)

      port_begin = (@config.get("PORT_BEGIN") || "35531").to_i
      ports_per_user = (@config.get("PORTS_PER_USER") || "5").to_i

      # Note, due to a mismatch between dev and prod this is
      # intentionally not GEAR_MIN_UID and the range must
      # wrap back around on itself.
      uid_begin = (@config.get("UID_BEGIN") || "500").to_i

      wrap_uid = ((65536 - port_begin)/ports_per_user)+uid_begin

      if @uid >= wrap_uid
        tuid = @uid - wrap_uid + uid_begin
      else
        tuid = @uid
      end

      proxy_port_begin = (tuid-uid_begin) * ports_per_user + port_begin

      proxy_port_range = (proxy_port_begin ... (proxy_port_begin + ports_per_user))

      cmd = %{openshift-port-proxy-cfg setproxy}
      proxy_port_range.each { |i| cmd << " #{i} delete" }
      out, err, rc = shellCmd(cmd)

      notify_observers(:after_initialize_openshift_port_proxy)
      return rc == 0
    end